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
Mostrar archivo Open project: Monobjc/monobjc-tools Class Usage Examples

Public Methods

Method 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 method

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
return void

BuildIndexes() public method

Builds indexes according to defined keys.
public BuildIndexes ( ) : void
return void

Clone() public method

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

Compile() public method

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
return System.Xml.XPath.XPathExpression

GetAttribute() public method

See XPathNavigator.GetAttribute.
public GetAttribute ( string localName, string namespaceURI ) : string
localName string
namespaceURI string
return string

GetNamespace() public method

See XPathNavigator.GetNamespace.
public GetNamespace ( string localname ) : string
localname string
return string

IndexingXPathNavigator() public method

Creates IndexingXPathNavigator over specified XPathNavigator.
public IndexingXPathNavigator ( XPathNavigator navigator ) : System
navigator System.Xml.XPath.XPathNavigator Core XPathNavigator
return System

IsSamePosition() public method

See XPathNavigator.IsSamePosition.
public IsSamePosition ( XPathNavigator other ) : bool
other System.Xml.XPath.XPathNavigator
return bool

MoveTo() public method

See XPathNavigator.MoveTo.
public MoveTo ( XPathNavigator other ) : bool
other System.Xml.XPath.XPathNavigator
return bool

MoveToAttribute() public method

See XPathNavigator.MoveToAttribute.
public MoveToAttribute ( string localName, string namespaceURI ) : bool
localName string
namespaceURI string
return bool

MoveToFirst() public method

See XPathNavigator.MoveToFirst.
public MoveToFirst ( ) : bool
return bool

MoveToFirstAttribute() public method

See XPathNavigator.MoveToFirstAttribute.
public MoveToFirstAttribute ( ) : bool
return bool

MoveToFirstChild() public method

See XPathNavigator.MoveToFirstChild.
public MoveToFirstChild ( ) : bool
return bool

MoveToFirstNamespace() public method

See XPathNavigator.MoveToFirstNamespace(XPathNamespaceScope).
public MoveToFirstNamespace ( XPathNamespaceScope namespaceScope ) : bool
namespaceScope XPathNamespaceScope
return bool

MoveToId() public method

See XPathNavigator.MoveToId.
public MoveToId ( string id ) : bool
id string
return bool

MoveToNamespace() public method

See XPathNavigator.MoveToNamespace.
public MoveToNamespace ( string @namespace ) : bool
@namespace string
return bool

MoveToNext() public method

See XPathNavigator.MoveToNext().
public MoveToNext ( ) : bool
return bool

MoveToNextAttribute() public method

See XPathNavigator.MoveToNextAttribute.
public MoveToNextAttribute ( ) : bool
return bool

MoveToNextNamespace() public method

See XPathNavigator.MoveToNextNamespace(XPathNamespaceScope).
public MoveToNextNamespace ( XPathNamespaceScope namespaceScope ) : bool
namespaceScope XPathNamespaceScope
return bool

MoveToParent() public method

See XPathNavigator.MoveToParent.
public MoveToParent ( ) : bool
return bool

MoveToPrevious() public method

See XPathNavigator.MoveToPrevious.
public MoveToPrevious ( ) : bool
return bool

MoveToRoot() public method

See XPathNavigator.MoveToRoot.
public MoveToRoot ( ) : void
return void

Select() public method

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