Hi,
Is there any way to change the name of XML node? In the following xml,
I want to change the node <FIELD_1> to <FIELD_ITEM> in all the places.
Ex:
<NewDataSet>
<LOOKUP>
<FIELD_1>First_Item113</FIELD_1>
<FIELD_2>First_Item224</FIELD_2>
</LOOKUP>
<LOOKUP>
<FIELD_1>Second_Item11</FIELD_1>
<FIELD_2>Second_Item222</FIELD_2>
</LOOKUP>
<LOOKUP>
<FIELD_1>Third_Item11</FIELD_1>
<FIELD_2>Third_Item22</FIELD_2>
</LOOKUP>
</NewDataSet>
I am using the following asp.net code, and I am able to read FIELD_1 in
localname but I am not able to change. any ideas?
Dim m_xmld As XmlDocument
Dim m_nodelist As XmlNodeList
Dim m_node As XmlNode
'Create the XML Document
m_xmld = New XmlDocument
'Load the Xml file
m_xmld.Load("c:\temp\test.xml")
'Get the list of name nodes
m_nodelist = m_xmld.SelectNodes("/NewDataSet/LOOKUP")
Dim i As Integer
For Each m_node In m_nodelist
'CHANGE LOCALNAME
Next
m_xmld.Save("c:\temp\test.xml")
Thanks