We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,153 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

XSLT replace element from imported XML

Say I have the following XML:

<People>
    <Group id="1">
        <Person FirstName="Bob" Surname="The Builder"/>
        <Person FirstName="Jane" Surname="Doe"/>
    </Group>
    <Group id="2">
        <Person FirstName="Billie" Surname="Jean"/>
    </Group>
</People>

How can I update Group 1 dynamically by replacing it from an imported xml file (for this sake, we'll store it in a variable called $ImportXML)?

<People>
    <Group id="1">
        <Person FirstName="Donald" Surname="Duck"/>
        <Person FirstName="Daisy" Surname="Duck"/>
        <Person FirstName="Mickey" Surname="Mouse"/>
        <Person FirstName="Minnie" Surname="Mouse"/>
    </Group>
    <Group id="2">
        <Person FirstName="Billie" Surname="Jean"/>
    </Group>
</People>
1
Contributor
0
Replies
1
View
f_atencia
Junior Poster in Training
59 posts since Aug 2009
Reputation Points: 10
Solved Threads: 4
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.9016 seconds using 2.67MB