I'm using xml, and after creating a document out of it, I'd like to
create a new document out of some particular node (with all its
children). Below "XML" is the larger document, and I want to make a
new document from the node "intervals". This is how I did it with the
transform package:

Node intervals = XML.getFirstChild().getFirstChild();
TransformerFactory tf = TransformerFactory.newInstance();
Transformer xf = tf.newTransformer();
DOMResult dr = new DOMResult();
xf.transform(new DOMSource(adherenceIntervals), dr);
Document adherenceIntervalsDoc = (Document) dr.getNode();

Any suggestions?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to