如题,举列更佳.

解决方案 »

  1.   

    Element 是 Node 的子集 如:
    <Book>             //node
      <Name>           //node
        C#             //node
      </Name>          //node
    </Book>            //node以上所有都是 Node
    但是 只有 <Name>C#</Name> 和 <Book>.....</Book> 是 Element
      

  2.   

    XmlElement从XmlNode继承而来,功能基本相同,但XmlElement有更多的功能XmlElements are a type of node. In fact, if you look at the members of XmlNode and XmlElement in the .NET Framework, you will see that they are very much alike, but XmlElement has more going on. It inherits XmlNode and then is further customized. This is because an element is more specialized. A node is more general in scope. The document is a node, a processing instruction is a node, and so forth. Elements are different. If you look at the XmlNodeType property of an element, you will see that it is Element, one of the many types of nodes you find.
      

  3.   

    顾名思义,XmlNode表示一个节点,包括XmlElement(元素)和XmlAttribute(属性)等
      

  4.   

    XmlNode表示节点
    XmlElement表示元素,功能更多
      

  5.   

    Thanks.
    But when should I use XmlElement and when should I use XmlNode is more appropriately?
      

  6.   

    如果你是做和xmldocument相关的操作,一般用xmlelement;