比如xml文件如下:
<a>
  <b/>
  <c/>
</a>
我想在中间,即a.childnode[1]的位置插入一个node
变成
<a>
  <b/>
  <newNode/>
  <c/>
</a>
谢谢

解决方案 »

  1.   

    还有就是能一处指定位置节点比如
    <a>
      <b/>
      <c/>
    </a>
    我要移除第0个节点<b/>
    变成
    <a>
      <c/>
    </a>
    该怎么做
      

  2.   

    就是在指定索引位置插入和删除xmlNode
      

  3.   

    我想用xmlDoc.ChildNodes[1].removeall,但是只能以去node的attributes
      

  4.   

    XMLDocument.InsertAfter or InsertBeforeCould you have a try on these 2 methods?