cant reach data in xml with namespaces
Posted: Fri Mar 24, 2006 6:34 pm
Hi!
I have a problem retriving data from xml file.
XML:
XSLT:
...why do i get blank output?
Thank you for your help.
I have a problem retriving data from xml file.
XML:
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<Data xmlns="http://something.com/Documents/Schemas/doc.xsd"
xmlns:e="http://something.com/Documents/Schemas/file.xsd">
<e:Head>
<e:name>John</e:name>
<e:address1>London, UK</e:address1>
<e:postNumber>123456</e:postNumber>
</e:Head>
<body>
<age>35</age>
<kids>3</kids>
<car>ford</car>
</body>
</Data>
XSLT:
Code: Select all
<?xml version="1.0" encoding="windows-1250" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:edp="http://http://something.com/Documents/Schemas/file.xsd">
<xsl:template match="/">
<xsl:value-of select="//Data/e:Head/e:name" />
<xsl:value-of select="//Data/Body/age" />
</xsl:template>
</xsl:stylesheet>
...why do i get blank output?
Thank you for your help.