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

XML update in c#

Status
Not open for further replies.

kingstonr

Programmer
Dec 5, 2005
26
US
HI,

I am loading the below xml in dom documnet

<x:pivotTable>
<x:OWCVersion>11.0.0.6555</x:OWCVersion>
<x:DisplayScreenTips />
<x:NoAutoFit />
<x:Height>376</x:Height>
<x:Width>1278</x:Width>
<x:CubeProvider>msolap.2</x:CubeProvider>
<x:CacheDetails />
<x:ConnectionString>Provider=MSPersist.1</x:ConnectionString>
<x:CommandText> <x:Name>Microsoft Office PivotTable 11.0</x:Name>


XmlDocument objxml = new XmlDocument();
objxml.LoadXml(strabovexml)

after that I want to update the <x:CommandText> with other valuelike<x:commanText>
can anybody help me out in this.
 
once the document is loaded navigate to the nodes/attributes you want to update. then overwrite the file you loaded. with objxml.write([file name]);
you'll need to have some sort of concurrency check so you don't overwrite someone elses changes.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top