Hi all,
How to get a portion of a xml document in
String format.
>
So I want to read only from element B (So it wil B C & D) and get the representation of this in String with the xml tag names as well.
I tried XPath which provides the element values only and not the tag names.
Also want to avoid recursively iterating and generating the xml document.
Looking for some thing neat like (XPath not necessary):
XPath.evaluate("B","XMLDoc.xml") // and the result be as above.
Thanks
P.S. the xml documents do not have any attributes.