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.

Afficher le fichier Open project: formicary/fpml-toolkit-csharp

Protected Properties

Свойство Type Description
context System.Xml.XmlElement
document System.Xml.XmlDocument

Méthodes publiques

Méthode 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 méthode

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.
Résultat System

Browser() public méthode

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 .
Résultat System

GetAttribute() public méthode

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

GetAttribute() public méthode

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.
Résultat string

HasChildNodes() public méthode

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

MoveToFirstChild() public méthode

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

MoveToLastChild() public méthode

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

MoveToNextSibling() public méthode

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

MoveToParent() public méthode

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

MoveToPreviousSibling() public méthode

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

Property Details

context protected_oe property

The context XmlElement.
protected XmlElement,System.Xml context
Résultat System.Xml.XmlElement

document protected_oe property

The underlying XmlDocument.
protected XmlDocument,System.Xml document
Résultat System.Xml.XmlDocument