|
-
March 9th, 2006, 10:53 AM
#1
Replace main node name
This might be a simple question....
I have a simple xml file:
<?xml version="1.0" encoding="UTF-8"?>
<Content>
<Element1>ele2</Element1>
<Element2>ele2</Element2>
</Content>
I want to replace Content with Page and I tried:
XmlNode firstNode = xmlDoc.SelectSingleNode("Content");
firstNode.LocalName.Replace("Content","Page");
Obviously I am doing it wrong or not understanding it properly, so, I am not getting the desired output. What is the correct api that I should use?
I am using C# for my code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|