aspose file tools*
The moose likes XML and Related Technologies and the fly likes Converting an XML Node to XML String/Text 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 "Converting an XML Node to XML String/Text" Watch "Converting an XML Node to XML String/Text" New topic
Author

Converting an XML Node to XML String/Text

Krysty Sullivan
Ranch Hand

Joined: Jun 06, 2002
Posts: 48
How do I convert a Node to its corresponding XML Text or String?
Node pageNode = pageNodeList.item(0);
//How can pageNode be converted to XML String
(e.g. <param><page>2</page></param> ?
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
The interface Node has the method getNodeValue() which returns a String.
I guess this is what you are after.
Cheers,
Dan


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Try this. But you will need Xerces.


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Converting an XML Node to XML String/Text