aspose file tools*
The moose likes XML and Related Technologies and the fly likes How to convert a node into xml format 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 "How to convert a node into xml format" Watch "How to convert a node into xml format" New topic
Author

How to convert a node into xml format

Raghunath Nandyala
Ranch Hand

Joined: Jan 24, 2006
Posts: 64
Hi

Im having one node (Element) say root, How to convert this into a string that represents XML format data like <root></root>.

Thanks
Raghunath N


SCBCD,SCWCD,SCJP
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
You can use xslt for this.


Rahul Bhattacharjee
LinkedIn - Blog
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12787
    
    5
Presumably you have the name of the Node, why not just build a String with that name? No need to fire up XSLT.
Note that if there is text content contained by that Element you will have to extract the Text node that holds the content.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to convert a node into xml format