开发者_开发百科I have a node <name></name> where I put name. Now I want to put an array of names there.
If you must put ARRAY to this object you can use some syntax like:
<name>
 <element>X</element>
 <element>Y</element>
</name>
or use a some serialization to string and pack to it.
<name>X,Y</name>
XmlNode node = xdoc.SelectSingleNode(path);            
foreach(string x in val)
{
    XmlNode subNode = xdoc.CreateNode(XmlNodeType.Element, subNodeName, null);
    subNode.InnerText = x;
    node.AppendChild(subNode);
}
path is the path to the node in xml
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论