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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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))
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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!
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.
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))
Dont use VTDNavHUge for small documents, use the standard version for small docs.