XmlNodeType XmlNodeType XmlNodeType XmlNodeType Enum

定義

指定節點的類型。Specifies the type of node.

public enum class XmlNodeType
public enum XmlNodeType
type XmlNodeType = 
Public Enum XmlNodeType
繼承

欄位

Attribute Attribute Attribute Attribute 2

屬性 (例如 id='123' )。An attribute (for example, id='123' ).

CDATA CDATA CDATA CDATA 4

CDATA 區段 (例如 <![CDATA[my escaped text]]> )。A CDATA section (for example, <![CDATA[my escaped text]]> ).

Comment Comment Comment Comment 8

註解 (例如 <!-- my comment --> )。A comment (for example, <!-- my comment --> ).

Document Document Document Document 9

文件物件 (作為文件樹狀結構的根) 可存取整個 XML 文件。A document object that, as the root of the document tree, provides access to the entire XML document.

DocumentFragment DocumentFragment DocumentFragment DocumentFragment 11

文件片段。A document fragment.

DocumentType DocumentType DocumentType DocumentType 10

文件類型宣告,以下列標記指示 (例如 <!DOCTYPE...> )。The document type declaration, indicated by the following tag (for example, <!DOCTYPE...> ).

Element Element Element Element 1

項目 (例如 <item> )。An element (for example, <item> ).

EndElement EndElement EndElement EndElement 15

結尾項目標記 (例如 </item> )。An end element tag (for example, </item> ).

EndEntity EndEntity EndEntity EndEntity 16

XmlReader 到達實體取代的結尾 (由於呼叫 ResolveEntity() 所致) 時傳回。Returned when XmlReader gets to the end of the entity replacement as a result of a call to ResolveEntity().

Entity Entity Entity Entity 6

實體宣告 (例如 <!ENTITY...> )。An entity declaration (for example, <!ENTITY...> ).

EntityReference EntityReference EntityReference EntityReference 5

實體參考 (例如 &num; )。A reference to an entity (for example, &num; ).

None None None None 0

如果尚未呼叫 Read 方法,則由 XmlReader 傳回此項目。This is returned by the XmlReader if a Read method has not been called.

Notation Notation Notation Notation 12

文件類型宣告中的標記法 (例如 <!NOTATION...> )。A notation in the document type declaration (for example, <!NOTATION...> ).

ProcessingInstruction ProcessingInstruction ProcessingInstruction ProcessingInstruction 7

處理指示 (例如 <?pi test?> )。A processing instruction (for example, <?pi test?> ).

SignificantWhitespace SignificantWhitespace SignificantWhitespace SignificantWhitespace 14

混合內容模型中標記之間的空白字元,或 xml:space="preserve" 範圍中的空白字元。White space between markup in a mixed content model or white space within the xml:space="preserve" scope.

Text Text Text Text 3

節點的文字內容。The text content of a node.

Whitespace Whitespace Whitespace Whitespace 13

標記之間的空白字元。White space between markup.

XmlDeclaration XmlDeclaration XmlDeclaration XmlDeclaration 17

XML 宣告 (例如 <?xml version='1.0'?> )。The XML declaration (for example, <?xml version='1.0'?> ).

備註

下表提供有關 XML 節點以及其父系和子節點的其他資訊。The following table provides additional information about XML nodes, as well as their parent and child nodes.

欄位Field 說明Description 可以有子節點:Can have child nodes: 可以是的子節點:Can be a child node of:
Attribute EntityReferenceTextEntityReference, Text 無。None. 它不會被視為的子節點ElementIt is not considered a child node of an Element.
CDATA CDATA 區段是用來將無法辨識為標記的文字區塊取消鎖定。CDATA sections are used to escape blocks of text that would otherwise be recognized as markup. 無。None. DocumentFragmentEntityReferenceElementDocumentFragment, EntityReference, and Element
Comment 無。None. DocumentDocumentFragmentEntityReferenceDocument, DocumentFragment, EntityReference
Document XmlDeclarationElement (最多1個)、 ProcessingInstructionCommentDocumentTypeXmlDeclaration, Element (a maximum of one), ProcessingInstruction, Comment, DocumentType None
DocumentFragment 使節點或子樹與檔產生關聯, 而不實際包含在檔中。Associates a node or subtree with a document without actually being contained within the document. Element, ProcessingInstruction, Comment, Text, CDATA, EntityReferenceElement, ProcessingInstruction, Comment, Text, CDATA, EntityReference 無。None.
DocumentType NotationEntityNotation, Entity None
Element Element, Text, Comment, ProcessingInstruction, CDATA, EntityReferenceElement, Text, Comment, ProcessingInstruction, CDATA, EntityReference Document, DocumentFragment, EntityReference, ElementDocument, DocumentFragment, EntityReference, Element
EndElement XmlReader到達元素的結尾時傳回。Returned when the XmlReader gets to the end of an element.
EndEntity
Entity 代表展開實體的子節點 ( Text例如和EntityReference節點)Child nodes that represent the expanded entity (for example, Text and EntityReference nodes) DocumentType
EntityReference Element, ProcessingInstruction, Comment, Text, CDATA, EntityReferenceElement, ProcessingInstruction, Comment, Text, CDATA, EntityReference Attribute, DocumentFragment, Element, EntityReferenceAttribute, DocumentFragment, Element, EntityReference
None
Notation None DocumentType
ProcessingInstruction None Document, DocumentFragment, Element, EntityReferenceDocument, DocumentFragment, Element, EntityReference
SignificantWhitespace
Text None Attribute, DocumentFragment, Element, EntityReferenceAttribute, DocumentFragment, Element, EntityReference
Whitespace
XmlDeclaration 必須是檔中的第一個節點。Must be the first node in the document. 它可以有提供版本和編碼資訊的屬性。It can have attributes that provide version and encoding information. None Document

適用於