While parsing an XML, given a Node object, can I retrieve the raw XML that corresponds to that Node? I’m using Java and parsing the XML using JDOM.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Element.toString()should return a String representation of the Element butyou can also use the XMLOutputter for that purpose (for writing the xml to some outputstream):
this simple snippet should write the XML of the root element to stdout.
hope that helped..