C# 클래스 MS.Internal.Xml.Cache.XPathNode

Implementation of a Node in the XPath/XQuery data model. 1. All nodes are stored in variable-size pages (max 65536 nodes/page) of XPathNode structuSR. 2. Pages are sequentially numbered. Nodes are allocated in strict document order. 3. Node references take the form of a (page, index) pair. 4. Each node explicitly stores a parent and a sibling reference. 5. If a node has one or more attributes and/or non-collapsed content children, then its first child is stored in the next slot. If the node is in the last slot of a page, then its first child is stored in the first slot of the next page. 6. Attributes are linked together at the start of the child list. 7. Namespaces are allocated in totally separate pages. Elements are associated with declared namespaces via a hashtable map in the document. 8. Name parts are always non-null (string.Empty for nodes without names) 9. XPathNodeInfoAtom contains all information that is common to many nodes in a document, and therefore is atomized to save space. This includes the document, the name, the child, sibling, parent, and value pages, and the schema type. 10. The node structure is 20 bytes in length. Out-of-line overhead is typically 2-4 bytes per node.
파일 보기 프로젝트 열기: gbarnett/shared-source-cli-2.0 1 사용 예제들

공개 메소드들

메소드 설명
Create ( XPathNodeInfoAtom info, XPathNodeType xptyp, int idxParent ) : void

Constructs a XPathNode. Later, the idxSibling and value fields may be fixed up.

Create ( XPathNodePageInfo pageInfo ) : void

Constructs the 0th XPathNode in each page, which contains only page information.

ElementMatch ( string localName, string namespaceName ) : bool

Returns true if this is an Element node with a name that matches the specified localName and namespaceName. Assume that localName has been atomized, but namespaceName has not.

GetParent ( XPathNode &pageNode ) : int

Returns the parent of this node. If this node has no parent, then 0 is returned.

GetRoot ( XPathNode &pageNode ) : int

Returns the root node of the current document. This always succeeds.

GetSibling ( XPathNode &pageNode ) : int

Returns the next sibling of this node. If this node has no next sibling, then 0 is returned.

GetSimilarElement ( XPathNode &pageNode ) : int

Returns the next element in document order that has the same local name hashcode as this element. If there are no similar elements, then 0 is returned.

NameMatch ( string localName, string namespaceName ) : bool

Returns true if this node's name matches the specified localName and namespaceName. Assume that localName has been atomized, but namespaceName has not.

SetCollapsedLineInfoOffset ( int posOffset ) : void

Set the position offset of this element's collapsed text.

SetCollapsedValue ( string value ) : void

Create a collapsed text node on this element having the specified value.

SetEmptyValue ( bool allowShortcutTag ) : void

Create an empty element value.

SetLineInfoOffsets ( int lineNumOffset, int linePosOffset ) : void

Set this node's line number information.

SetParentProperties ( XPathNodeType xptyp ) : void

This method is called when a new child is appended to this node's list of attributes and children. The type of the new child is used to determine how various parent properties should be set.

SetSibling ( XPathNodeInfoTable infoTable, XPathNode pageSibling, int idxSibling ) : void

Link this node to its next sibling. If "pageSibling" is different than the one stored in the InfoAtom, re-atomize.

SetSimilarElement ( XPathNodeInfoTable infoTable, XPathNode pageSimilar, int idxSimilar ) : void

Link this element to the next element in document order that shares a local name having the same hash code. If "pageSimilar" is different than the one stored in the InfoAtom, re-atomize.

SetValue ( string value ) : void

Set this node's value.

메소드 상세

Create() 공개 메소드

Constructs a XPathNode. Later, the idxSibling and value fields may be fixed up.
public Create ( XPathNodeInfoAtom info, XPathNodeType xptyp, int idxParent ) : void
info XPathNodeInfoAtom
xptyp XPathNodeType
idxParent int
리턴 void

Create() 공개 메소드

Constructs the 0th XPathNode in each page, which contains only page information.
public Create ( XPathNodePageInfo pageInfo ) : void
pageInfo XPathNodePageInfo
리턴 void

ElementMatch() 공개 메소드

Returns true if this is an Element node with a name that matches the specified localName and namespaceName. Assume that localName has been atomized, but namespaceName has not.
public ElementMatch ( string localName, string namespaceName ) : bool
localName string
namespaceName string
리턴 bool

GetParent() 공개 메소드

Returns the parent of this node. If this node has no parent, then 0 is returned.
public GetParent ( XPathNode &pageNode ) : int
pageNode XPathNode
리턴 int

GetRoot() 공개 메소드

Returns the root node of the current document. This always succeeds.
public GetRoot ( XPathNode &pageNode ) : int
pageNode XPathNode
리턴 int

GetSibling() 공개 메소드

Returns the next sibling of this node. If this node has no next sibling, then 0 is returned.
public GetSibling ( XPathNode &pageNode ) : int
pageNode XPathNode
리턴 int

GetSimilarElement() 공개 메소드

Returns the next element in document order that has the same local name hashcode as this element. If there are no similar elements, then 0 is returned.
public GetSimilarElement ( XPathNode &pageNode ) : int
pageNode XPathNode
리턴 int

NameMatch() 공개 메소드

Returns true if this node's name matches the specified localName and namespaceName. Assume that localName has been atomized, but namespaceName has not.
public NameMatch ( string localName, string namespaceName ) : bool
localName string
namespaceName string
리턴 bool

SetCollapsedLineInfoOffset() 공개 메소드

Set the position offset of this element's collapsed text.
public SetCollapsedLineInfoOffset ( int posOffset ) : void
posOffset int
리턴 void

SetCollapsedValue() 공개 메소드

Create a collapsed text node on this element having the specified value.
public SetCollapsedValue ( string value ) : void
value string
리턴 void

SetEmptyValue() 공개 메소드

Create an empty element value.
public SetEmptyValue ( bool allowShortcutTag ) : void
allowShortcutTag bool
리턴 void

SetLineInfoOffsets() 공개 메소드

Set this node's line number information.
public SetLineInfoOffsets ( int lineNumOffset, int linePosOffset ) : void
lineNumOffset int
linePosOffset int
리턴 void

SetParentProperties() 공개 메소드

This method is called when a new child is appended to this node's list of attributes and children. The type of the new child is used to determine how various parent properties should be set.
public SetParentProperties ( XPathNodeType xptyp ) : void
xptyp XPathNodeType
리턴 void

SetSibling() 공개 메소드

Link this node to its next sibling. If "pageSibling" is different than the one stored in the InfoAtom, re-atomize.
public SetSibling ( XPathNodeInfoTable infoTable, XPathNode pageSibling, int idxSibling ) : void
infoTable XPathNodeInfoTable
pageSibling XPathNode
idxSibling int
리턴 void

SetSimilarElement() 공개 메소드

Link this element to the next element in document order that shares a local name having the same hash code. If "pageSimilar" is different than the one stored in the InfoAtom, re-atomize.
public SetSimilarElement ( XPathNodeInfoTable infoTable, XPathNode pageSimilar, int idxSimilar ) : void
infoTable XPathNodeInfoTable
pageSimilar XPathNode
idxSimilar int
리턴 void

SetValue() 공개 메소드

Set this node's value.
public SetValue ( string value ) : void
value string
리턴 void