C# Class HandCoded.Xml.Browser

The Browser class tracks a position of interest within a DOM document which can be moved around as the document is explored.

During traversal the Browser automatically skips over any non-element nodes in the underlying XmlDocument.

Mostrar archivo Open project: formicary/fpml-toolkit-csharp

Protected Properties

Property Type Description
context System.Xml.XmlElement
document System.Xml.XmlDocument

Public Methods

Method Description
Browser ( XmlDocument document ) : System

Constructs a Browser that is attached to the root element of the XmlDocument indicated by document.

Browser ( XmlDocument document, XmlElement context ) : System

Constructs a Browser that is attached to a specific XmlElement of the given XmlDocument.

GetAttribute ( string name ) : string

Returns the value of the indicated attribute on the context element.

GetAttribute ( string name, string uri ) : string

Returns the value of the indicated attribute on the context element.

HasChildNodes ( ) : bool

Determines if the context XmlElement has at least one child element.

MoveToFirstChild ( ) : bool

Moves the context to the first child XmlElement if one exists.

MoveToLastChild ( ) : bool

Moves the context to the last child XmlElement if one exists.

MoveToNextSibling ( ) : bool

Moves the context to the next sibling XmlElement if one exists.

MoveToParent ( ) : bool

Moves the context to the parent XmlElement if one exists.

MoveToPreviousSibling ( ) : bool

Moves the context to the previous sibling XmlElement if one exists.

Method Details

Browser() public method

Constructs a Browser that is attached to the root element of the XmlDocument indicated by document.
public Browser ( XmlDocument document ) : System
document System.Xml.XmlDocument The to explore.
return System

Browser() public method

Constructs a Browser that is attached to a specific XmlElement of the given XmlDocument.
public Browser ( XmlDocument document, XmlElement context ) : System
document System.Xml.XmlDocument The to explore.
context System.Xml.XmlElement The initial context .
return System

GetAttribute() public method

Returns the value of the indicated attribute on the context element.
public GetAttribute ( string name ) : string
name string The name of the required attribute.
return string

GetAttribute() public method

Returns the value of the indicated attribute on the context element.
public GetAttribute ( string name, string uri ) : string
name string The name of the required attribute.
uri string The attribute's owning namespace.
return string

HasChildNodes() public method

Determines if the context XmlElement has at least one child element.
public HasChildNodes ( ) : bool
return bool

MoveToFirstChild() public method

Moves the context to the first child XmlElement if one exists.
public MoveToFirstChild ( ) : bool
return bool

MoveToLastChild() public method

Moves the context to the last child XmlElement if one exists.
public MoveToLastChild ( ) : bool
return bool

MoveToNextSibling() public method

Moves the context to the next sibling XmlElement if one exists.
public MoveToNextSibling ( ) : bool
return bool

MoveToParent() public method

Moves the context to the parent XmlElement if one exists.
public MoveToParent ( ) : bool
return bool

MoveToPreviousSibling() public method

Moves the context to the previous sibling XmlElement if one exists.
public MoveToPreviousSibling ( ) : bool
return bool

Property Details

context protected_oe property

The context XmlElement.
protected XmlElement,System.Xml context
return System.Xml.XmlElement

document protected_oe property

The underlying XmlDocument.
protected XmlDocument,System.Xml document
return System.Xml.XmlDocument