[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] Comparing xslt attributes and putting them in sequential order
Subject: [xsl] Comparing xslt attributes and putting them in sequential order From: "varun bhatnagar varun292006@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 12 Aug 2014 12:08:28 -0000 |
Hi, I have two files and I am trying to merge them. I want to compare the attribute value of "version" with in the same file, if the values are different I want to copy them in sequential order but if they are same then those attribute should have the same value. Any kind of help is appreciated. :) I have pasted my files below: *File1.xml* <?xml version="1.0" encoding="UTF-8"?> <config> <version> <input00 version ="1"/> <name00 name ="abc"/> </version> <version> <input00 version ="2"/> <name00 name ="def"/> </version> </config> *File2.xml* <?xml version="1.0" encoding="UTF-8"?> <config> <version> <input00 version ="1"/> <name00 name ="xyz"/> </version> <version> <input00 version ="2"/> <name00 name ="pqr"/> </version> </version> <version> <input00 version ="2"/> <name00 name ="pqr1"/> </version> <version> <input00 version ="3"/> <name00 name ="uvw"/> </version> <version> <input00 version ="3"/> <name00 name ="uvw1"/> </version> <version> <input00 version ="4"/> <name00 name ="lmn"/> </version> </config> *Output.xml* <config> <version> <input00 version ="1"/> <name00 name ="abc"/> </version> <version> <input00 version ="2"/> <name00 name ="def"/> </version> </version> <version> <input00 version ="3"/> <name00 name ="xyz"/> </version> <version> <input00 version ="4"/> <name00 name ="pqr"/> </version> <version> <input00 version ="4"/> <name00 name ="pqr1"/> </version> <version> <input00 version ="5"/> <name00 name ="uvw"/> </version> </version> <version> <input00 version ="5"/> <name00 name ="uvw1"/> </version> <version> <input00 version ="6"/> <name00 name ="lmn"/> </version> </config> Thanks, BR, Varun
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XML and the like, doing more , L2L 2L emanuelallen@ | Thread | Re: [xsl] Comparing xslt attributes, Abel Braaksma (Exsel |
[xsl] XML and the like, doing more , L2L 2L emanuelallen@ | Date | Re: [xsl] Comparing xslt attributes, Abel Braaksma (Exsel |
Month |
Keywords