Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Removing an element but keeping its child nodes.

0 views
Skip to first unread message

ryangomez

unread,
Nov 17, 2009, 11:51:24 AM11/17/09
to
Hi everyone,

Okay the XML bit keeps getting cropped and hopefully it will work this time!

How do I go about transforming the XML document below into result.xml? Basically what I'm aiming for is to remove one of the element but keeping the children. So I would like to remove the <Location> element but keep the <City> element (the <City> element being the child element of <Location>). Any pointers would be greatly appreciated. Thanks!

<User>

<TITLE>Mrs</TITLE>

<INITIALS>D</INITIALS>

<FIRST_NAME>Doris</FIRST_NAME>

<LAST_NAME>Smith</LAST_NAME>

<Location>

<City>London</City>

</Location>

</User>


** How do I transform this to**


<User>

<TITLE>Mrs</TITLE>

<INITIALS>D</INITIALS>

<FIRST_NAME>Doris</FIRST_NAME>

<LAST_NAME>Smith</LAST_NAME>

<City>London</City>

</User>

EggHeadCafe - Software Developer Portal of Choice
Build the IE WebControls Visual Studio Solution!
http://www.eggheadcafe.com/tutorials/aspnet/30de7452-88ce-4a69-aa36-43240a86a57e/build-the-ie-webcontrols.aspx

0 new messages