wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Comment Handling while parsing and building an xml file in xerces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Comment Handling while parsing and building an xml file in xerces" Watch "Comment Handling while parsing and building an xml file in xerces" New topic
Author

Comment Handling while parsing and building an xml file in xerces

liinaa
Greenhorn

Joined: Sep 21, 2001
Posts: 5
I am using a xerces parser DOM API. I need to handle xml comments while parsing and building an xml file. while building the xml file, i need to insert an xml comment node...
Can someone help me out with this??
Thanks
Palani kumar
Greenhorn

Joined: Sep 01, 2001
Posts: 12
Hai
there is an method in Document to create comment
Comment comment = Document.createComment("Specify comment to be added");
then as usual you can append as a child to the node you want to add using the appendChild() method

Cheers
Palanikumar

------------------
In the end everything is Right,If it's not then It's not the End


In the end everything is Right,If it's not then It's not the End
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Comment Handling while parsing and building an xml file in xerces