C# Class Mvp.Xml.Common.XPath.IndexingXPathNavigator

IndexingXPathNavigator enables lazy or eager indexing of any XML store (XmlDocument, XPathDocument or any other IXPathNavigable XML store) thus providing an alternative way to select nodes using XSLT key() function directly from an index table instead of searhing the XML tree. This allows drastically decrease selection time on preindexed selections.

Author: Oleg Tkachenko, http://www.xmllab.net.

Contributors: Daniel Cazzulino, blog

See "XML Indexing Part 1: XML IDs, XSLT Keys and IndexingXPathNavigator" article for more info.

Inheritance: System.Xml.XPath.XPathNavigator
Afficher le fichier Open project: Monobjc/monobjc-tools Class Usage Examples

Méthodes publiques

Méthode Description
AddKey ( string keyName, string match, string use ) : void

Adds named key for use with key() function.

BuildIndexes ( ) : void

Builds indexes according to defined keys.

Clone ( ) : XPathNavigator

Creates new cloned version of the IndexingXPathNavigator.

Compile ( string xpath ) : XPathExpression

Compiles XPath expressions using base XPathNavigator.Compile() method and set IndexingXsltContext instance to the result of the compilation so compiled expressions support key() extension function.

GetAttribute ( string localName, string namespaceURI ) : string

See XPathNavigator.GetAttribute.

GetNamespace ( string localname ) : string

See XPathNavigator.GetNamespace.

IndexingXPathNavigator ( XPathNavigator navigator ) : System

Creates IndexingXPathNavigator over specified XPathNavigator.

IsSamePosition ( XPathNavigator other ) : bool

See XPathNavigator.IsSamePosition.

MoveTo ( XPathNavigator other ) : bool

See XPathNavigator.MoveTo.

MoveToAttribute ( string localName, string namespaceURI ) : bool

See XPathNavigator.MoveToAttribute.

MoveToFirst ( ) : bool

See XPathNavigator.MoveToFirst.

MoveToFirstAttribute ( ) : bool

See XPathNavigator.MoveToFirstAttribute.

MoveToFirstChild ( ) : bool

See XPathNavigator.MoveToFirstChild.

MoveToFirstNamespace ( XPathNamespaceScope namespaceScope ) : bool

See XPathNavigator.MoveToFirstNamespace(XPathNamespaceScope).

MoveToId ( string id ) : bool

See XPathNavigator.MoveToId.

MoveToNamespace ( string @namespace ) : bool

See XPathNavigator.MoveToNamespace.

MoveToNext ( ) : bool

See XPathNavigator.MoveToNext().

MoveToNextAttribute ( ) : bool

See XPathNavigator.MoveToNextAttribute.

MoveToNextNamespace ( XPathNamespaceScope namespaceScope ) : bool

See XPathNavigator.MoveToNextNamespace(XPathNamespaceScope).

MoveToParent ( ) : bool

See XPathNavigator.MoveToParent.

MoveToPrevious ( ) : bool

See XPathNavigator.MoveToPrevious.

MoveToRoot ( ) : void

See XPathNavigator.MoveToRoot.

Select ( string xpath ) : XPathNodeIterator

Selects a node set using the specified XPath expression.

Method Details

AddKey() public méthode

Adds named key for use with key() function.
public AddKey ( string keyName, string match, string use ) : void
keyName string The name of the key
match string XPath pattern, defining the nodes to which /// this key is applicable
use string XPath expression used to determine /// the value of the key for each matching node
Résultat void

BuildIndexes() public méthode

Builds indexes according to defined keys.
public BuildIndexes ( ) : void
Résultat void

Clone() public méthode

Creates new cloned version of the IndexingXPathNavigator.
public Clone ( ) : XPathNavigator
Résultat System.Xml.XPath.XPathNavigator

Compile() public méthode

Compiles XPath expressions using base XPathNavigator.Compile() method and set IndexingXsltContext instance to the result of the compilation so compiled expressions support key() extension function.
public Compile ( string xpath ) : XPathExpression
xpath string XPath expression to complile
Résultat System.Xml.XPath.XPathExpression

GetAttribute() public méthode

See XPathNavigator.GetAttribute.
public GetAttribute ( string localName, string namespaceURI ) : string
localName string
namespaceURI string
Résultat string

GetNamespace() public méthode

See XPathNavigator.GetNamespace.
public GetNamespace ( string localname ) : string
localname string
Résultat string

IndexingXPathNavigator() public méthode

Creates IndexingXPathNavigator over specified XPathNavigator.
public IndexingXPathNavigator ( XPathNavigator navigator ) : System
navigator System.Xml.XPath.XPathNavigator Core XPathNavigator
Résultat System

IsSamePosition() public méthode

See XPathNavigator.IsSamePosition.
public IsSamePosition ( XPathNavigator other ) : bool
other System.Xml.XPath.XPathNavigator
Résultat bool

MoveTo() public méthode

See XPathNavigator.MoveTo.
public MoveTo ( XPathNavigator other ) : bool
other System.Xml.XPath.XPathNavigator
Résultat bool

MoveToAttribute() public méthode

See XPathNavigator.MoveToAttribute.
public MoveToAttribute ( string localName, string namespaceURI ) : bool
localName string
namespaceURI string
Résultat bool

MoveToFirst() public méthode

See XPathNavigator.MoveToFirst.
public MoveToFirst ( ) : bool
Résultat bool

MoveToFirstAttribute() public méthode

See XPathNavigator.MoveToFirstAttribute.
public MoveToFirstAttribute ( ) : bool
Résultat bool

MoveToFirstChild() public méthode

See XPathNavigator.MoveToFirstChild.
public MoveToFirstChild ( ) : bool
Résultat bool

MoveToFirstNamespace() public méthode

See XPathNavigator.MoveToFirstNamespace(XPathNamespaceScope).
public MoveToFirstNamespace ( XPathNamespaceScope namespaceScope ) : bool
namespaceScope XPathNamespaceScope
Résultat bool

MoveToId() public méthode

See XPathNavigator.MoveToId.
public MoveToId ( string id ) : bool
id string
Résultat bool

MoveToNamespace() public méthode

See XPathNavigator.MoveToNamespace.
public MoveToNamespace ( string @namespace ) : bool
@namespace string
Résultat bool

MoveToNext() public méthode

See XPathNavigator.MoveToNext().
public MoveToNext ( ) : bool
Résultat bool

MoveToNextAttribute() public méthode

See XPathNavigator.MoveToNextAttribute.
public MoveToNextAttribute ( ) : bool
Résultat bool

MoveToNextNamespace() public méthode

See XPathNavigator.MoveToNextNamespace(XPathNamespaceScope).
public MoveToNextNamespace ( XPathNamespaceScope namespaceScope ) : bool
namespaceScope XPathNamespaceScope
Résultat bool

MoveToParent() public méthode

See XPathNavigator.MoveToParent.
public MoveToParent ( ) : bool
Résultat bool

MoveToPrevious() public méthode

See XPathNavigator.MoveToPrevious.
public MoveToPrevious ( ) : bool
Résultat bool

MoveToRoot() public méthode

See XPathNavigator.MoveToRoot.
public MoveToRoot ( ) : void
Résultat void

Select() public méthode

Selects a node set using the specified XPath expression.
public Select ( string xpath ) : XPathNodeIterator
xpath string A string representing an XPath expression
Résultat System.Xml.XPath.XPathNodeIterator