VTDGenHuge : Updating File Content

Help
Karthik
2012-02-21
2013-05-15
  • Karthik

    Karthik - 2012-02-21

    Hi,

    I have a large file which I need to stream, parse and update.

    Say, the file looks something like this:
    <root>
    <A><id>111</id></A>
    <D><id>222</id></D>
    <C><id>333</id></C>
    </root>

    My XPath expressions could look like this :
    /root/A/id
    /root/C/id

    I know I can use VTDGenHuge to parse the file, but I can't see any API to update the file. I can't use XMLModifier on VTDGenHuge because the API doesn't support it. I wanna be able to stream in the above file, update the file based on the two xpath expressions and write the file back to the file system. Also, I don't want to stream and write to the file system for every xpath expression. Can you please advise if this possible with VTD? Thanks for your help.

    Cheers!

     
  • jimmy zhang

    jimmy zhang - 2012-05-21

    sorry for the late reply. The update api only is available for VTDGen not VTDGenHuge. We will think about adding the update API for VTDGEnhuge but can't make any promise here.

     
  • Anonymous - 2012-10-25

    Was this done in the latest version? Can I use XMLModifier.bind() for VTDGEnhuge ? also, my files are around 600-700 kb (around 12-14K lines) even then it can't parseFile  ? when I reduce is 1K then it goes in this.
    should VTDGen  work with 600-800 kb files?

    if (vg.parseFile("C:/Projects/OrderReportingApp/Orders.xml", false))

     
  • jimmy zhang

    jimmy zhang - 2012-11-07

    Dont use VTDNavHUge for small documents, use the standard version for small docs.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks