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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a value in an XML Document 1

Status
Not open for further replies.

ftpdoo

Programmer
Aug 9, 2001
202
0
0
GB
Hi

I have a file MetaData.xml and i wish to update one tag value. Can this be done easily?

There might be multiple script nodes..

I want to change the value of <FileLocation> to "C:\" instead of "Results".

Any ideas?
Jonny


<?xml version="1.0"?>
<WorkOrder>
<Script>
<Code>MLT01</Code>
<Mandatory>OPTIONAL</Mandatory>
<Status>Partial</Status>
<StatusCode>P</StatusCode>
<Description>Morris</Description>
<FileName>240605104404.xml</FileName>
<FileLocation>Results</FileLocation>
<ResultSetName>MLT01_1</ResultSetName>
</Script>
</WorkOrder>
 
Hi,

How about (once you have confirmed that the node exists):

Code:
gsPCPhotoDir.Text = "C:"

' make sure you save the XML at the end
oXMLObject.Save strFileNameYouOpened

Spong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top