C#, XML, adding new nodes

前端 未结 2 854
清酒与你
清酒与你 2020-11-30 12:12

I am trying to add new nodes to an existing XML file. i have this file with first test elements in it:

 
<         


        
2条回答
  •  广开言路
    2020-11-30 12:26

    I have the same trouble, with root==null, but MSDN helped me.

    You need to use // instead of /

    XmlNode root = xmldoc.SelectSingleNode("//ns:Root//ns:profesori", nsMgr);
    

提交回复
热议问题