xsl:copy-of question

D

David Shen

I would like to copy the entire tree. However, it only copy the text.

The xml file is the following:
<?xml version="1.0"?>
<hello>
Hello there, world!
<AAA>valueA</AAA>
</hello>

The xsl file is the following:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:eek:utput encoding="UTF-16" method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>

The result is
Hello there, world! valueA

I would like to get
<hello>
Hello there, world!
<AAA>valueA</AAA>
</hello>

Thanks

David
 
D

Dimitre Novatchev

Most probably you are viewing the result with a browser.

When viewed with a normal text editor the result is an exact copy of the
source xml document.


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top