View Single Post
  #5 (permalink)  
Old April 28th, 2006, 08:48 AM
boondocksaint20 boondocksaint20 is offline
Authorized User
 
Join Date: Apr 2006
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, I've got a test setup, but I can't get the result I want. It outputs '121', and I did a View Source, and the XML still looks the same. I need the XML to look like this:

This is my desired results:

<testXML>
  <name>
    <test1>1</test1>
    <test2>2</test2>
  </name>
  <name>
    <test1>1</test1>
    <test2></test2> //line that needs to appear
  </name>
</testXML>
-----------------------

Using this code:

My XSL:
------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

   <xsl:template match="name">
    <test1>
        <xsl:value-of select="test1"/>
    </test1>
    <test2>
        <xsl:value-of select="test2"/>
    </test2>
   </xsl:template>

</xsl:stylesheet>
------------------------

My XML:
-----------------------

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>

<testXML>
  <name>
    <test1>1</test1>
    <test2>2</test2>
  </name>
  <name>
    <test1>1</test1>
  </name>
</testXML>


Thanks again for your help!

Reply With Quote