Results 1 to 8 of 8

Thread: Parsing XML (freezing window)

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    592

    Question Parsing XML (freezing window)

    I need to parse an XML file and insert the data into database.

    The datafeed is located on remote server so it takes for a while and also the window is not responding while it parses the tags.

    What do you suggest here? Multithreading maybe? I just don't want the browsers freezing while i parse the XML data.

    Thanks

  2. #2
    Hyperactive Member dnanetwork's Avatar
    Join Date
    Oct 2007
    Location
    Mumbai
    Posts
    349

    Re: Parsing XML (freezing window)

    well use xslt...with 5...after reading xslt....you'll start chanting their name..

    xslt will help you to parse any xml format to standard html + you can add css and blah blah!

    to parse xml if you go by C# it will take a lot of time....if u r not gud with xml..

    but xslt is something like [ The Faster Got Fastest...]

    hope that helps...

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    592

    Re: Parsing XML (freezing window)

    well i am not good at XSLT but the time is not what i am concerned about here.
    I just don't want it freezing during my C# code is parsing the XML data and saving into DB (sql server).

    Please suggest something ... thanks

  4. #4
    Hyperactive Member dnanetwork's Avatar
    Join Date
    Oct 2007
    Location
    Mumbai
    Posts
    349

    Re: Parsing XML (freezing window)

    to save the data in the database in terms of xml and while reading it read it through xsl

    select from survey_info for xml auto, elements; ...saving data to database and the next thing is use xsl..to get the data and go to w3schools.com...

    it will take 30 mins..

    and if no then...show me your code may be i can help..

    and please don't forget to mention the flow of you code...

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    592

    Re: Parsing XML (freezing window)

    Ok i have my code and it works just FINE.
    I JUST want to ask some gurus if MULTITHREADING would suit my needs.
    That's all. However, thank you so much for the recommendation.

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Parsing XML (freezing window)

    Are you parsing the XML in the codebehind (VB.NET/C#) or JavaScript?

    If it's the codebehind and all you need is to insert the data into the database without a response from the database, then you can kick a thread off that requests and processes the XML; the execution will return to the main page and the page will return to the browser - the best you'll be able to do is tell the user that "The XML is being processed, should be ready in a few minutes."

    To do this, look at ThreadStart.http://msdn.microsoft.com/en-us/libr...ebrequest.aspx

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    592

    Re: Parsing XML (freezing window)

    yeah it is codebehind. I will check the ThreadStart .. thank you so much for the link

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Parsing XML (freezing window)

    Let us know if you get stuck. Threading is often daunting if you haven't used it before but it becomes so obvious when you start using it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width