#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    1
    Rep Power
    0

    Using xml documents to construct new xml document


    Hi,

    I have to use XML contents that I got from DB to construct a new XML content. I must write in c/c++ and run in Linux.

    e.g. I got three xml contents from DB as the following:

    1. <user firstname = "David" lastname = "Smith">
    <group value = "group1"></group>
    </user>

    2. <user firstname = "Cindy" lastname = "Jones">
    <group value = "group2"></group>
    </user>

    3. <user firstname = "Joe" lastname = "Ko">
    <group value = "group1"></group>
    </user>

    And then I need to construct a new XML content like:

    <userList>
    <userGroup>
    value = "group1"
    <name
    firstname = "David"
    lastname = "Smith"
    </name>
    <name
    firstname = "Joe"
    lastname = "Ko"
    </name>
    </userGroup>
    <userGroup>
    value = "group2"
    <name
    firstname = "Cindy"
    lastname = "Jones"
    </name>
    </userGroup>
    </userList>

    Can anybody share his experience? Thanks !

    Best

    J.J
  2. #2
  3. I'm Baaaaaaack!
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jul 2003
    Location
    Maryland
    Posts
    5,538
    Rep Power
    244
    Sounds like homework to me! Ask specific questions about your implementation.

    My blog, The Fount of Useless Information http://sol-biotech.com/wordpress/
    Free code: http://sol-biotech.com/code/.
    Secure Programming: http://sol-biotech.com/code/SecProgFAQ.html.
    Performance Programming: http://sol-biotech.com/code/PerformanceProgramming.html.
    LinkedIn Profile: http://www.linkedin.com/in/keithoxenrider

    It is not that old programmers are any smarter or code better, it is just that they have made the same stupid mistake so many times that it is second nature to fix it.
    --Me, I just made it up

    The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
    --George Bernard Shaw
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2003
    Posts
    778
    Rep Power
    12
    look at xslt

    --
    http://www.raditha.com/

IMN logo majestic logo threadwatch logo seochat tools logo