How to use XSLT to transform XML according to the data in another XML

Discussion in 'XML' started by ai2003lian@yahoo.com, Feb 2, 2005.

  1. Guest

    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!
    , Feb 2, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Isambella  via DotNetMonster.com

    Transform XML string using XSLT file

    Isambella via DotNetMonster.com, Aug 1, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    9,702
    Isambella via DotNetMonster.com
    Aug 2, 2005
  2. Igor
    Replies:
    1
    Views:
    4,943
    Dimitre Novatchev
    Jul 20, 2003
  3. chris yoker
    Replies:
    3
    Views:
    364
    chris yoker
    Jan 18, 2005
  4. Replies:
    1
    Views:
    654
    Joris Gillis
    Feb 2, 2005
  5. adi
    Replies:
    1
    Views:
    31,561
    Joe Kesselman
    Jun 6, 2006
Loading...

Share This Page