This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Copying nodes problem
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] Copying nodes problem
- From: "Kanthi Damodaran" <kdsm17 at hotmail dot com>
- Date: Wed, 03 Oct 2001 20:04:13 +0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hello -
I have a problem with copying nodes that I can't figure out. I will reaclly
appreciate the help.
Sample XML file :-
<?xml version="1.0"?>
<TOP>
<filter type="GetIndID">
<filter type="Initial Table">
<filter type="BizClass" modifier="OSIND">
<filter type="Phrase" modifier="a">
<filter type="IndustryInfo">
<Industry KeyID="1">
<Title><![CDATA[Label #1]]></Title>
<Description><![CDATA[Description #1]]></Description>
</Industry>
<Industry KeyID="220557">
<Title><![CDATA[Label #2]]></Title>
<Description><![CDATA[Description #2]]></Description>
</Industry>
<Industry KeyID="220572">
<Title><![CDATA[Label #3]]></Title>
<Description><![CDATA[Description #3]]></Description>
</Industry>
</filter>
</filter>
</filter>
</filter>
</filter>
</TOP>
Basically I want to copy over all the <filter> tags and manipulate the tags
betiween them < > so that the output looks like below -
Desired Output :-
<?xml version="1.0"?>
<TOP>
<filter type="GetIndID">
<filter type="Initial Table">
<filter type="BizClass" modifier="OSIND">
<filter type="Phrase" modifier="a">
<filter type="IndustryInfo">
<Industry>
<osind>
<code>1</code>
<label><![CDATA[Label #1]]></label>
<description><![CDATA[Description #1]]></description>
</osind>
</Industry>
<Industry>
<osind>
<code>2</code>
<label><![CDATA[Label #2]]></label>
<description><![CDATA[Description #2]]></description>
</osind>
</Industry>
<Industry>
<osind>
<code>3</code>
<label><![CDATA[Label #3]]></label>
<description><![CDATA[Description #3]]></description>
</osind>
</Industry>
</filter>
</filter>
</filter>
</filter>
</filter>
</TOP>
Thanks in advance.
Kanthi
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list