[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Copying nodes problem
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|