Abbey Workshop | ||||||||||
How do you copy all of or a portion of an XML document exactly? The following code snippet shows how to do that exactly. Using this templat,e for an entire document or for a portion of a document, will copy the contents of a particular node exactly. This can be very useful if you want to leave a large portion of a document unchanged.
Download source for: copy.xsl
The xsl:copy command gets each element while the xsl:copy-of is used to get each attribute. Everything is copied including namespaces.
Copyright © Abbey Workshop 2006