1,105,450 Community Members

XSLT replace element from imported XML

Member Avatar
f_atencia
Junior Poster in Training
60 posts since Aug 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 4 [?]
Skill Endorsements: 0 [?]
 
0
 

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>
Question Self-Answered as of 5 Months Ago
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article