Search Results for

    Show / Hide Table of Contents
    View Source

    Class NavigableNavigator

    Provides a cursor model for navigating Umbraco data as if it were XML.

    Inheritance
    System.Object
    System.Xml.XPath.XPathItem
    System.Xml.XPath.XPathNavigator
    Namespace: Umbraco.Cms.Core.Xml.XPath
    Assembly: Umbraco.Core.dll
    Syntax
    public class NavigableNavigator : XPathNavigator, ICloneable, IXmlNamespaceResolver, IXPathNavigable

    Constructors

    View Source

    NavigableNavigator(INavigableSource, Int32, Int32)

    Initializes a new instance of the NavigableNavigator class with a content source, and an optional root content.

    Declaration
    public NavigableNavigator(INavigableSource source, int rootId = 0, int maxDepth = 2147483647)
    Parameters
    Type Name Description
    INavigableSource source

    The content source.

    System.Int32 rootId

    The root content identifier.

    System.Int32 maxDepth

    The maximum depth.

    Remarks

    When no root content is supplied then the root of the source is used.

    Properties

    View Source

    BaseURI

    Gets the base URI for the current node.

    Declaration
    public override string BaseURI { get; }
    Property Value
    Type Description
    System.String
    View Source

    InternalState

    Declaration
    public NavigableNavigator.State InternalState { get; }
    Property Value
    Type Description
    NavigableNavigator.State
    View Source

    IsEmptyElement

    Gets a value indicating whether the current node is an empty element without an end element tag.

    Declaration
    public override bool IsEmptyElement { get; }
    Property Value
    Type Description
    System.Boolean
    View Source

    LocalName

    Gets the Name of the current node without any namespace prefix.

    Declaration
    public override string LocalName { get; }
    Property Value
    Type Description
    System.String
    View Source

    Name

    Gets the qualified name of the current node.

    Declaration
    public override string Name { get; }
    Property Value
    Type Description
    System.String
    View Source

    NamespaceURI

    Gets the namespace URI of the current node.

    Declaration
    public override string NamespaceURI { get; }
    Property Value
    Type Description
    System.String
    View Source

    NameTable

    Gets the XmlNameTable of the XPathNavigator.

    Declaration
    public override XmlNameTable NameTable { get; }
    Property Value
    Type Description
    System.Xml.XmlNameTable
    View Source

    NodeType

    Gets the XPathNodeType of the current node.

    Declaration
    public override XPathNodeType NodeType { get; }
    Property Value
    Type Description
    System.Xml.XPath.XPathNodeType
    View Source

    Prefix

    Gets the namespace prefix associated with the current node.

    Declaration
    public override string Prefix { get; }
    Property Value
    Type Description
    System.String
    View Source

    UnderlyingObject

    Gets the underlying content object.

    Declaration
    public override object UnderlyingObject { get; }
    Property Value
    Type Description
    System.Object
    View Source

    Value

    Gets the string value of the item.

    Declaration
    public override string Value { get; }
    Property Value
    Type Description
    System.String
    Remarks

    Does not fully behave as per the specs, as we report empty value on content elements, and we start reporting values only on property elements. This is because, otherwise, we would dump the whole database and it probably does not make sense at Umbraco level.

    Methods

    View Source

    Clone()

    Creates a new XPathNavigator positioned at the same node as this XPathNavigator.

    Declaration
    public override XPathNavigator Clone()
    Returns
    Type Description
    System.Xml.XPath.XPathNavigator

    A new XPathNavigator positioned at the same node as this XPathNavigator.

    View Source

    CloneWithNewRoot(Int32, Int32)

    Creates a new XPathNavigator using the same source but positioned at a new root.

    Declaration
    public XPathNavigator CloneWithNewRoot(int id, int maxDepth = 2147483647)
    Parameters
    Type Name Description
    System.Int32 id
    System.Int32 maxDepth
    Returns
    Type Description
    System.Xml.XPath.XPathNavigator

    A new XPathNavigator using the same source and positioned at a new root.

    Remarks

    The new root can be above this navigator's root.

    View Source

    CloneWithNewRoot(String, Int32)

    Creates a new XPathNavigator using the same source but positioned at a new root.

    Declaration
    public XPathNavigator CloneWithNewRoot(string id, int maxDepth = 2147483647)
    Parameters
    Type Name Description
    System.String id
    System.Int32 maxDepth
    Returns
    Type Description
    System.Xml.XPath.XPathNavigator

    A new XPathNavigator using the same source and positioned at a new root.

    Remarks

    The new root can be above this navigator's root.

    View Source

    IsSamePosition(XPathNavigator)

    Determines whether the current XPathNavigator is at the same position as the specified XPathNavigator.

    Declaration
    public override bool IsSamePosition(XPathNavigator nav)
    Parameters
    Type Name Description
    System.Xml.XPath.XPathNavigator nav

    The XPathNavigator to compare to this XPathNavigator.

    Returns
    Type Description
    System.Boolean

    true if the two XPathNavigator objects have the same position; otherwise, false.

    View Source

    MoveTo(XPathNavigator)

    Moves the XPathNavigator to the same position as the specified XPathNavigator.

    Declaration
    public override bool MoveTo(XPathNavigator nav)
    Parameters
    Type Name Description
    System.Xml.XPath.XPathNavigator nav

    The XPathNavigator positioned on the node that you want to move to.

    Returns
    Type Description
    System.Boolean

    Returns true if the XPathNavigator is successful moving to the same position as the specified XPathNavigator; otherwise, false. If false, the position of the XPathNavigator is unchanged.

    View Source

    MoveToFirstAttribute()

    Moves the XPathNavigator to the first attribute of the current node.

    Declaration
    public override bool MoveToFirstAttribute()
    Returns
    Type Description
    System.Boolean

    Returns true if the XPathNavigator is successful moving to the first attribute of the current node; otherwise, false. If false, the position of the XPathNavigator is unchanged.

    View Source

    MoveToFirstChild()

    Moves the XPathNavigator to the first child node of the current node.

    Declaration
    public override bool MoveToFirstChild()
    Returns
    Type Description
    System.Boolean

    Returns true if the XPathNavigator is successful moving to the first child node of the current node; otherwise, false. If false, the position of the XPathNavigator is unchanged.

    View Source

    MoveToFirstNamespace(XPathNamespaceScope)

    Moves the XPathNavigator to the first namespace node that matches the XPathNamespaceScope specified.

    Declaration
    public override bool MoveToFirstNamespace(XPathNamespaceScope namespaceScope)
    Parameters
    Type Name Description
    System.Xml.XPath.XPathNamespaceScope namespaceScope

    An XPathNamespaceScope value describing the namespace scope.

    Returns
    Type Description
    System.Boolean

    Returns true if the XPathNavigator is successful moving to the first namespace node; otherwise, false. If false, the position of the XPathNavigator is unchanged.

    View Source

    MoveToId(String)

    Moves to the node that has an attribute of type ID whose value matches the specified String.

    Declaration
    public override bool MoveToId(string id)
    Parameters
    Type Name Description
    System.String id

    A String representing the ID value of the node to which you want to move.

    Returns
    Type Description
    System.Boolean

    true if the XPathNavigator is successful moving; otherwise, false. If false, the position of the navigator is unchanged.

    View Source

    MoveToNext()

    Moves the XPathNavigator to the next sibling node of the current node.

    Declaration
    public override bool MoveToNext()
    Returns
    Type Description
    System.Boolean

    true if the XPathNavigator is successful moving to the next sibling node; otherwise, false if there are no more siblings or if the XPathNavigator is currently positioned on an attribute node. If false, the position of the XPathNavigator is unchanged.

    View Source

    MoveToNextAttribute()

    Moves the XPathNavigator to the next attribute.

    Declaration
    public override bool MoveToNextAttribute()
    Returns
    Type Description
    System.Boolean

    Returns true if the XPathNavigator is successful moving to the next attribute; false if there are no more attributes. If false, the position of the XPathNavigator is unchanged.

    View Source

    MoveToNextNamespace(XPathNamespaceScope)

    Moves the XPathNavigator to the next namespace node matching the XPathNamespaceScope specified.

    Declaration
    public override bool MoveToNextNamespace(XPathNamespaceScope namespaceScope)
    Parameters
    Type Name Description
    System.Xml.XPath.XPathNamespaceScope namespaceScope

    An XPathNamespaceScope value describing the namespace scope.

    Returns
    Type Description
    System.Boolean

    Returns true if the XPathNavigator is successful moving to the next namespace node; otherwise, false. If false, the position of the XPathNavigator is unchanged.

    View Source

    MoveToParent()

    Moves the XPathNavigator to the parent node of the current node.

    Declaration
    public override bool MoveToParent()
    Returns
    Type Description
    System.Boolean

    Returns true if the XPathNavigator is successful moving to the parent node of the current node; otherwise, false. If false, the position of the XPathNavigator is unchanged.

    View Source

    MoveToPrevious()

    Moves the XPathNavigator to the previous sibling node of the current node.

    Declaration
    public override bool MoveToPrevious()
    Returns
    Type Description
    System.Boolean

    Returns true if the XPathNavigator is successful moving to the previous sibling node; otherwise, false if there is no previous sibling node or if the XPathNavigator is currently positioned on an attribute node. If false, the position of the XPathNavigator is unchanged.

    View Source

    MoveToRoot()

    Moves the XPathNavigator to the root node that the current node belongs to.

    Declaration
    public override void MoveToRoot()
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • NavigableNavigator(INavigableSource, Int32, Int32)
    • Properties
      • BaseURI
      • InternalState
      • IsEmptyElement
      • LocalName
      • Name
      • NamespaceURI
      • NameTable
      • NodeType
      • Prefix
      • UnderlyingObject
      • Value
    • Methods
      • Clone()
      • CloneWithNewRoot(Int32, Int32)
      • CloneWithNewRoot(String, Int32)
      • IsSamePosition(XPathNavigator)
      • MoveTo(XPathNavigator)
      • MoveToFirstAttribute()
      • MoveToFirstChild()
      • MoveToFirstNamespace(XPathNamespaceScope)
      • MoveToId(String)
      • MoveToNext()
      • MoveToNextAttribute()
      • MoveToNextNamespace(XPathNamespaceScope)
      • MoveToParent()
      • MoveToPrevious()
      • MoveToRoot()
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX