[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: replace value using two xml
miguel aviles wrote: > I have two xml files, saying > > File1.xml: > > <n a1="v1" a2="v2" a3="v3" /> > > File2.xml: > > <v1>a1="nv1" a2="nv2" a3="nv3"</v1> > > I want to replace v1 with nv1 in file1.xml Errr... then I don't understand why you need "File2.xml". <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="@*/[.='v1']" > <xsl:attribute name="name()">nv1</xsl:attribute> </xsl:template> How you go about deleting "File1.xml" and renaming the result document "File1.xml" is system dependent. 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
|