XmlNode.LocalName XmlNode.LocalName XmlNode.LocalName XmlNode.LocalName Property

定義

在衍生類別中覆寫時,取得節點的區域名稱。Gets the local name of the node, when overridden in a derived class.

public:
 abstract property System::String ^ LocalName { System::String ^ get(); };
public abstract string LocalName { get; }
member this.LocalName : string
Public MustOverride ReadOnly Property LocalName As String

屬性值

移除前置詞的節點名稱。The name of the node with the prefix removed. 例如, LocalName是元素<bk: book>的 book。For example, LocalName is book for the element <bk:book>.

傳回的名稱需視節點的 NodeType 而定。The name returned is dependent on the NodeType of the node:

類型Type 名稱Name
屬性Attribute 屬性的本機名稱。The local name of the attribute.
CDATACDATA #cdata-section#cdata-section
註解Comment #comment#comment
文件Document #document#document
DocumentFragmentDocumentFragment #document-fragment#document-fragment
DocumentTypeDocumentType 文件類型名稱。The document type name.
元素Element 項目的本機名稱。The local name of the element.
實體Entity 實體的名稱。The name of the entity.
EntityReferenceEntityReference 所參考的實體名稱。The name of the entity referenced.
NotationNotation 標記法名稱。The notation name.
ProcessingInstructionProcessingInstruction 處理指示的目標。The target of the processing instruction.
TextText #text#text
WhitespaceWhitespace #whitespace#whitespace
SignificantWhitespaceSignificantWhitespace #significant-whitespace#significant-whitespace
XmlDeclarationXmlDeclaration #xml-declaration#xml-declaration

備註

如果節點沒有前置詞,LocalName 會與相同NameIf the node does not have a prefix, LocalName is the same as Name.

適用於

另請參閱