|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Generating XML fragment to DOM node using XSL
Precisely. As a specific example, the following code fragment would append the second document as the last node of the root element of the first document. (The step that is easy to miss here is the importNode.) ... Element root = doc1.getDocumentElement(); Element root2 = doc2.getDocumentElement(); Element copy2 = (Element) doc1.importNode( root2 , true ); root.appendChild(copy2); While it is also easy to apply an XSLT transform directly to doc1 to transform doc1 into a new "Document" you would still need some way of having XSLT's document( ) (or similar function) refer to the already parsed document, doc2. So far the only suggestion for how to do this has been to serialize and save doc2. Stan Devitt cknell@xxxxxxxxxx wrote: [...] XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








