File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
XML and Related Technologies
How to convert a node into xml format
Joined: Jan 24, 2006
Nov 12, 2006 13:16:00
Im having one node (Element) say root, How to convert this into a
that represents XML format data like <root></root>.
Joined: Nov 29, 2005
Nov 12, 2006 22:14:00
You can use xslt for this.
Author and all-around good cowpoke
Joined: Mar 22, 2000
Nov 13, 2006 07:12:00
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.
Java Resources at
I agree. Here's the link:
subject: How to convert a node into xml format
Can an XML Node be converted to a String
XSLT - is it possible?
XSL Table output.
Xml File Ecryption
Converting an XML Node to XML String/Text
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013