HANM wrote:
> <?xml version="1.0">
> <request>
> <main>
> <name>ISO8856</name>
> </main>
> </request>
>
> here when we run a java class file it should replace "ISO8856"with
> "ISO9001". Any Assistance or example.
If you use the W3C DOM Level 3 Core as implemented in Java 1.5 and later
then you can select the 'name' element and set its textContent e.g.
Element name = (Element)xmlDocument.getElementsByTagName("name"). item(0);
name.setTextContent("ISO09001");
If you use DOM Level 2 Core (as implemente in Java 1.4) then you need to
access the firstChild and set its nodeValue
Element name = (Element)xmlDocument.getElementsByTagName("name"). item(0);
name.getFirstChild().setNodeValue("ISO09001");
--
Martin Honnen
http://JavaScript.FAQTs.com/