Updating xml using java

posted by | Leave a comment

This can be done using the set Attribute() method or setting the node Value property of the attribute node.

( ii ) The light_html2xml does not appears to have correctly converted over the orginal Html to Xml but some how it has been picked up by the parser in the same class, but not by the same parser from another class.

( iv ) light_html2xml is good as it strip out all namespace, DTD, Entity Resolver, etc and only return what I need.

JTidy does correct conversion but include namespace, DTD, Entity Resolver which makes parsing difficulty.

Though, I have achieved this, but I am unable to update the value for 3rd record, & 5th record ie., id=3 & id=5. As a result, I have come to the following conclusion so far: ( i ) There is some file locking that is prevent sax Builder from parsing the XML file at the time.

having re-read this, it may be that you only want to update the text content, i.e. if that is the case, that is fairly straightforward.

( iii ) I would like to use another conversion tool such as Tagsoup in place of light_html2xml to determine where the cause of this issue is coming from.

As a result, would you or anyone be able to assist me coming up with a few lines of conversion statements using Tagsoup since I am not familiar with using this tool?

Almost two years ago, I wrote a blog with code (found here) that parsed XML easily using the Apache Xerces DOM parser.

In the blog, I wrote some helper methods to locate XML elements and return their values in a less verbose way.

Leave a Reply

craig list dating