A
ai2003lian
I have a XML containing more information than required. And I want to
transform it to a XML with less information according to the
requirement data in another XML. How could I accomplish this using
XSLT?
Here're the XML files:
source.xml :
<AllFields>
<field name="f1", type="N">value1</field>
<field name="f2", type="N">value1</field>
<field name="f3", type="N">value1</field>
<field name="f4", type="N">value1</field>
....
</AllFields>
requirement.xml :
<requiredFields>
<field>f1</field>
<field>f3</field>
</requiredFields>
result.xml :
<AllFields>
<field name="f1", type="N">value1</field>
<field name="f3", type="N">value1</field>
</AllFields>
Thanks in advance!
transform it to a XML with less information according to the
requirement data in another XML. How could I accomplish this using
XSLT?
Here're the XML files:
source.xml :
<AllFields>
<field name="f1", type="N">value1</field>
<field name="f2", type="N">value1</field>
<field name="f3", type="N">value1</field>
<field name="f4", type="N">value1</field>
....
</AllFields>
requirement.xml :
<requiredFields>
<field>f1</field>
<field>f3</field>
</requiredFields>
result.xml :
<AllFields>
<field name="f1", type="N">value1</field>
<field name="f3", type="N">value1</field>
</AllFields>
Thanks in advance!