• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comment Handling while parsing and building an xml file in xerces

 
liinaa
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic