[This is preliminary documentation and is subject to change.]

Implements XPathNavigator over any object structure

Namespace:  Tools.XmlT.XPathT
Assembly:  Tools (in Tools.dll) Version: 1.5.2.0

Author: Đonny (dzonny@dzonny.cz)

Vertion history

1.5.2 (Alpha)
VersionAttribute and AuthorAttribute removed

Syntax

C#
public class XPathObjectNavigator : XPathNavigator, 
	ICloneable<XPathNavigator>
Visual Basic (Declaration)
Public Class XPathObjectNavigator _
	Inherits XPathNavigator _
	Implements ICloneable(Of XPathNavigator)
Visual C++
public ref class XPathObjectNavigator : public XPathNavigator, 
	ICloneable<XPathNavigator^>
J#
public class XPathObjectNavigator extends XPathNavigator implements ICloneable<XPathNavigator>
JScript
public class XPathObjectNavigator extends XPathNavigator implements ICloneable<XPathNavigator>

Remarks

Pass any object to CTor of this class and peudo-XML tree structure that can be navigated using XPath will be created.

The structure alwasy consists of root node and sequence of other nodes. For some spcially supported types (like Int32 or String; see for information) the text node is created and nothing else. For other types if created element node with three or four attributes and elements named as properties of such type and element named value-of for items of IEnumerable.

The attributes are:

Attribute nameDescription
type-nameShort name of type represented by node (see )
full-nameFull name of type represented by node (see )
nameName of property through which the object have been obtained. For rooth node contains String
enumerableIf context object of current node is IEnumerable and it is not of supported type contains true; otherwise it is not present.
circle-levelIf same (reference equal) object as context object of current node is context object of node somewhere at parent axis of current node this pseudo-attribute contains number of levels upward (on parent axis) to such (at level closest to root) object; otherwise this pseudo-attribute is not present.

Example for List<(Of <(T>)>)

Examples

< type-name="List`1" full-name="System.Collections.Generic.List`1[[System.String, mscorlib, Versionb=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]" name="" enumerable="true"> <Capacity type-name="Int32" full-name="System.Int32" name="Capacity">3</Capacity> <Count type-name="Int32" full-name="System.Int32" name="Count">3</Count> <item-of type-name="String" full-name="System.String" name="GetEnumerator">Item 1</item> <item-of type-name="String" full-name="System.String" name="GetEnumerator">Item 2</item> <item-of type-name="String" full-name="System.String" name="GetEnumerator">Item 3</item> </ >
Note: Root node is unnamed. Properties can be of complex types (stored as sub-trees). Order of occurence of attributes is as shown. Properties are alwas before enum items. name from enum items is always GetEnumerator. Name of node representing enum item - item-of can never be in conflict with name of property because it contains hyppen.

Definitions:

Current objectObject contained in [F:Tools.XmlT.XPathT.XPathObjectNavigator.[Step].[Object]] field of current stepCurrent stepLast item of Location collectionContext objectObject produced or used by current step. Value depends on type of step Type of stepContext objectXPathObjectNavigator..::.PropertyStepObject returned by getter of current propertyXPathObjectNavigator..::.EnumerableStepObject returned by enumerator at its current positionAny other defined in XPathObjectNavigatorSame as current objectParent step of another stepStep that lies on preceding index of Location collection then step which's parent it is.Current propertyFor property steps () it is Property otherwise it is nullCurrent enumeratorFor enumerable steps () it is Enumerator otherwise it is nullContext valueSame as context object with exception when current step is XPathObjectNavigator..::.SpecialStep (then it is value of pseudo-attribute)

Inheritance Hierarchy

System..::.Object
  System.Xml.XPath..::.XPathItem
    System.Xml.XPath..::.XPathNavigator
      Tools.XmlT.XPathT..::.XPathObjectNavigator

See Also