Hi all, My xml file looks like this. <program> <client host="192.168.1.34"> </client> </program> I want to update the value of host attribute to 192.168.1.66.How to do this in java.I have tried using DOM but it is not working.Can somebody have any idea?
Instead of the ByteArrayOutputStream this could be writing to a FileOutputStream. The newTransformer() call creates a Transformer that does not change the DOM, other Transformers can apply a XSL transformation.
Welcome to the weird world of XML with Java - Sun has a pretty good tutorial, just google for "Sun XML tutorial"