XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
radhakrish rsSubject: Need to remove the sub element from the xml file using xsl
Author: radhakrish rs
Date: 06 Nov 2008 07:23 AM
I have a xml file like

<root>
....
<site.info number="009" snumber="0122" wnumber="AtoZ" type="text"><ital>Rose,</ital> running text</site.info>

...
</root>

Please let me know how to remove the element <ital> without disturbing the contents.

Thanks in advance.

Postnext
James DurningSubject: Need to remove the sub element from the xml file using xsl
Author: James Durning
Date: 07 Nov 2008 03:25 PM
As posted in the other forum, Use a template for ital:

<xsl:template match="ital">
<xsl:apply-templates/>
</xsl:template>
<!-- copy template -->
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

Posttop
radhakrish rsSubject: Need to remove the sub element from the xml file using xsl
Author: radhakrish rs
Date: 07 Nov 2008 11:28 PM
Hi,

Thanks for info.

I had tried the copy template but it is not producing the desired output.

Also more specifically the <ital> & </ital> element need to be removed under the <site.info> element only.

I am using the XSL file to cleanup the xml file, just like a pre-processing script.

Thanks in advance.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.