
March 4th, 2002, 07:29 AM
|
 |
Madden Maniac
|
|
Join Date: Jun 2001
Location: Finland
Posts: 519
 
Time spent in forums: 1 Day 3 h 47 m 50 sec
Reputation Power: 8
|
|
|
Simple XSL -- XML question
A XSL newbie question: I've need to get everything that is inside the <item> -tags, nothing else. How can I do this?
Here's the xml:
PHP Code:
<biztalk_1 xmlns="urn:biztalk-org:biztalk:biztalk_1">
<header>
<delivery>
<message>
<messageID>8DC017F4F70D67E00000045C</messageID>
<sent>2002-02-27T09:29:06</sent>
</message>
<to>
<address>urn:sap-com:logical-system:BC2</address>
</to>
<from>
<address>urn:sap-com:logical-system:BC1</address>
</from>
</delivery>
</header>
<body>
<doc:Z_LISTEN_MMC.Response xmlns:doc="urn:sap-com:document:sap:rfc:functions" xmlns="">
<DCOM_TABLE>
<item>
<VKGRP>402</VKGRP>
<BEZEI/>
<KATR10>F4</KATR10>
<KUNNR>0010333001</KUNNR>
//And so on...
And here's the xsl file:
PHP Code:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" media-type="text/plain" indent="no" encoding="ISO-8859-1"/>
<xsl:template match="DCOM_TABLE">
<xsl:for-each select="item">
<xsl:value-of select="VKGRP"/>,<xsl:value-of select="BEZEI"/>,<xsl:value-of select="KATR10"/>,<xsl:value-of select="KUNNR"/>;
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
|