I have an XML file with the format below
<ScriptElement>
<ElementData xsi:type="FirstElement">
.......
.......
.......
<Description></Description>
........
</ElementData>
</ScriptElement>
<ScriptElement>
<ElementData xsi:type="SecondElement">
.......
.......
.......
<Description></Description>
........
</ElementData>
</ScriptElement>
<ScriptElement>
<ElementData xsi:type="ThirdElement">
.......
.......
.......
<Description></Description>
........
</ElementData>
</ScriptElement>
I want to change the InnerText
of the Description Node
which is under the xsi:type="SecondElement"
When i try to get the attribute value of the namespace
string attrValist = Doc.SelectSingleNode("ScriptElements/ScriptElement/ElementData/@xsi:type").Value;
MessageBox.Show(attrValist);
Am getting an error as "Namespace Manager or XsIContext needed. The query has a prefix variable or user-defined function"
Could you please suggest me how should i move forward.
Thanks