Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace part of an XML (by other XML file)

Status
Not open for further replies.

Peter55

Programmer
Nov 13, 2002
1
CH
Hello. I would like to replace part of an XML file by another. Up to now I have been using a mix of XSL, VBScript and ASP. Any code or relevant articles greatly appreciated. Thks and Rgds.

e.g.

1. XML looks like this:

<?xml version=&quot;1.0&quot;?>
<conferences>
<conf id=&quot;cnf1&quot; display=&quot;yes&quot;>
<field id=&quot;area&quot;>
<field_value>PT11 A</field_value>
</field>
<field id=&quot;dates&quot;>
<field_value>1-2 Jan 2003</field_value>
</field>
</conf>
<conf id=&quot;cnf2&quot; display=&quot;yes&quot;>
<field id=&quot;area&quot;>
<field_value>PT12 B</field_value>
</field>
<field id=&quot;dates&quot;>
<field_value>3-4 Jan 2003</field_value>
</field>
</conf>
</conferences>

2. I then have another XML file.
<conferences>
<conf id=&quot;cnf2&quot; display=&quot;yes&quot;>
<field id=&quot;area&quot;>
<field_value>PT12 Bb</field_value>
</field>
<field id=&quot;dates&quot;>
<field_value>13-14 Jan 2003</field_value>
</field>
</conf>
</conferences>

3. My final XML file needs to be:
<?xml version=&quot;1.0&quot;?>
<conferences>
<conf id=&quot;cnf1&quot; display=&quot;yes&quot;>
<field id=&quot;area&quot;>
<field_value>PT11 A</field_value>
</field>
<field id=&quot;dates&quot;>
<field_value>1-2 Jan 2003</field_value>
</field>
</conf>
<conf id=&quot;cnf2&quot; display=&quot;yes&quot;>
<field id=&quot;area&quot;>
<field_value>PT12 Bb</field_value>
</field>
<field id=&quot;dates&quot;>
<field_value>13-14 Jan 2003</field_value>
</field>
</conf>
</conferences>


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top