C# Class HtmlAgilityPack.HtmlNodeNavigator

Represents an HTML navigator on an HTML document seen as a data store.
Inheritance: System.Xml.XPath.XPathNavigator
Afficher le fichier Open project: henryford/FreakOut Class Usage Examples

Méthodes publiques

Méthode Description
Clone ( ) : XPathNavigator

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

GetAttribute ( string localName, string namespaceURI ) : string

Gets the value of the HTML attribute with the specified LocalName and NamespaceURI.

GetNamespace ( string name ) : string

Returns the value of the namespace node corresponding to the specified local name. Always returns string.Empty for the HtmlNavigator implementation.

HtmlNodeNavigator ( Stream stream ) : System

Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.

HtmlNodeNavigator ( Stream stream, Encoding encoding ) : System

Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.

HtmlNodeNavigator ( Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks ) : System

Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.

HtmlNodeNavigator ( Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks, int buffersize ) : System

Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.

HtmlNodeNavigator ( Stream stream, bool detectEncodingFromByteOrderMarks ) : System

Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.

HtmlNodeNavigator ( TextReader reader ) : System

Initializes a new instance of the HtmlNavigator and loads an HTML document from a TextReader.

HtmlNodeNavigator ( string path ) : System

Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.

HtmlNodeNavigator ( string path, Encoding encoding ) : System

Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.

HtmlNodeNavigator ( string path, Encoding encoding, bool detectEncodingFromByteOrderMarks ) : System

Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.

HtmlNodeNavigator ( string path, Encoding encoding, bool detectEncodingFromByteOrderMarks, int buffersize ) : System

Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.

HtmlNodeNavigator ( string path, bool detectEncodingFromByteOrderMarks ) : System

Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.

IsSamePosition ( XPathNavigator other ) : bool

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

MoveTo ( XPathNavigator other ) : bool

Moves to the same position as the specified HtmlNavigator.

MoveToAttribute ( string localName, string namespaceURI ) : bool

Moves to the HTML attribute with matching LocalName and NamespaceURI.

MoveToFirst ( ) : bool

Moves to the first sibling of the current node.

MoveToFirstAttribute ( ) : bool

Moves to the first HTML attribute.

MoveToFirstChild ( ) : bool

Moves to the first child of the current node.

MoveToFirstNamespace ( XPathNamespaceScope scope ) : bool

Moves the XPathNavigator to the first namespace node of the current element. Always returns false for the HtmlNavigator implementation.

MoveToId ( string id ) : bool

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

MoveToNamespace ( string name ) : bool

Moves the XPathNavigator to the namespace node with the specified local name. Always returns false for the HtmlNavigator implementation.

MoveToNext ( ) : bool

Moves to the next sibling of the current node.

MoveToNextAttribute ( ) : bool

Moves to the next HTML attribute.

MoveToNextNamespace ( XPathNamespaceScope scope ) : bool

Moves the XPathNavigator to the next namespace node. Always returns falsefor the HtmlNavigator implementation.

MoveToParent ( ) : bool

Moves to the parent of the current node.

MoveToPrevious ( ) : bool

Moves to the previous sibling of the current node.

MoveToRoot ( ) : void

Moves to the root node to which the current node belongs.

Private Methods

Méthode Description
HtmlNodeNavigator ( ) : System
HtmlNodeNavigator ( HtmlAgilityPack.HtmlDocument doc, HtmlNode currentNode ) : System
HtmlNodeNavigator ( HtmlNodeNavigator nav ) : System
InternalTrace ( object traceValue ) : void
Reset ( ) : void

Method Details

Clone() public méthode

Creates a new HtmlNavigator positioned at the same node as this HtmlNavigator.
public Clone ( ) : XPathNavigator
Résultat System.Xml.XPath.XPathNavigator

GetAttribute() public méthode

Gets the value of the HTML attribute with the specified LocalName and NamespaceURI.
public GetAttribute ( string localName, string namespaceURI ) : string
localName string The local name of the HTML attribute.
namespaceURI string The namespace URI of the attribute. Unsupported with the HtmlNavigator implementation.
Résultat string

GetNamespace() public méthode

Returns the value of the namespace node corresponding to the specified local name. Always returns string.Empty for the HtmlNavigator implementation.
public GetNamespace ( string name ) : string
name string The local name of the namespace node.
Résultat string

HtmlNodeNavigator() public méthode

Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.
public HtmlNodeNavigator ( Stream stream ) : System
stream Stream The input stream.
Résultat System

HtmlNodeNavigator() public méthode

Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.
public HtmlNodeNavigator ( Stream stream, Encoding encoding ) : System
stream Stream The input stream.
encoding System.Text.Encoding The character encoding to use.
Résultat System

HtmlNodeNavigator() public méthode

Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.
public HtmlNodeNavigator ( Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks ) : System
stream Stream The input stream.
encoding System.Text.Encoding The character encoding to use.
detectEncodingFromByteOrderMarks bool Indicates whether to look for byte order marks at the beginning of the stream.
Résultat System

HtmlNodeNavigator() public méthode

Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.
public HtmlNodeNavigator ( Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks, int buffersize ) : System
stream Stream The input stream.
encoding System.Text.Encoding The character encoding to use.
detectEncodingFromByteOrderMarks bool Indicates whether to look for byte order marks at the beginning of the stream.
buffersize int The minimum buffer size.
Résultat System

HtmlNodeNavigator() public méthode

Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.
public HtmlNodeNavigator ( Stream stream, bool detectEncodingFromByteOrderMarks ) : System
stream Stream The input stream.
detectEncodingFromByteOrderMarks bool Indicates whether to look for byte order marks at the beginning of the stream.
Résultat System

HtmlNodeNavigator() public méthode

Initializes a new instance of the HtmlNavigator and loads an HTML document from a TextReader.
public HtmlNodeNavigator ( TextReader reader ) : System
reader TextReader The TextReader used to feed the HTML data into the document.
Résultat System

HtmlNodeNavigator() public méthode

Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.
public HtmlNodeNavigator ( string path ) : System
path string The complete file path to be read.
Résultat System

HtmlNodeNavigator() public méthode

Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.
public HtmlNodeNavigator ( string path, Encoding encoding ) : System
path string The complete file path to be read.
encoding System.Text.Encoding The character encoding to use.
Résultat System

HtmlNodeNavigator() public méthode

Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.
public HtmlNodeNavigator ( string path, Encoding encoding, bool detectEncodingFromByteOrderMarks ) : System
path string The complete file path to be read.
encoding System.Text.Encoding The character encoding to use.
detectEncodingFromByteOrderMarks bool Indicates whether to look for byte order marks at the beginning of the file.
Résultat System

HtmlNodeNavigator() public méthode

Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.
public HtmlNodeNavigator ( string path, Encoding encoding, bool detectEncodingFromByteOrderMarks, int buffersize ) : System
path string The complete file path to be read.
encoding System.Text.Encoding The character encoding to use.
detectEncodingFromByteOrderMarks bool Indicates whether to look for byte order marks at the beginning of the file.
buffersize int The minimum buffer size.
Résultat System

HtmlNodeNavigator() public méthode

Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.
public HtmlNodeNavigator ( string path, bool detectEncodingFromByteOrderMarks ) : System
path string The complete file path to be read.
detectEncodingFromByteOrderMarks bool Indicates whether to look for byte order marks at the beginning of the file.
Résultat System

IsSamePosition() public méthode

Determines whether the current HtmlNavigator is at the same position as the specified HtmlNavigator.
public IsSamePosition ( XPathNavigator other ) : bool
other System.Xml.XPath.XPathNavigator The HtmlNavigator that you want to compare against.
Résultat bool

MoveTo() public méthode

Moves to the same position as the specified HtmlNavigator.
public MoveTo ( XPathNavigator other ) : bool
other System.Xml.XPath.XPathNavigator The HtmlNavigator positioned on the node that you want to move to.
Résultat bool

MoveToAttribute() public méthode

Moves to the HTML attribute with matching LocalName and NamespaceURI.
public MoveToAttribute ( string localName, string namespaceURI ) : bool
localName string The local name of the HTML attribute.
namespaceURI string The namespace URI of the attribute. Unsupported with the HtmlNavigator implementation.
Résultat bool

MoveToFirst() public méthode

Moves to the first sibling of the current node.
public MoveToFirst ( ) : bool
Résultat bool

MoveToFirstAttribute() public méthode

Moves to the first HTML attribute.
public MoveToFirstAttribute ( ) : bool
Résultat bool

MoveToFirstChild() public méthode

Moves to the first child of the current node.
public MoveToFirstChild ( ) : bool
Résultat bool

MoveToFirstNamespace() public méthode

Moves the XPathNavigator to the first namespace node of the current element. Always returns false for the HtmlNavigator implementation.
public MoveToFirstNamespace ( XPathNamespaceScope scope ) : bool
scope XPathNamespaceScope An XPathNamespaceScope value describing the namespace scope.
Résultat bool

MoveToId() public méthode

Moves to the node that has an attribute of type ID whose value matches the specified string.
public MoveToId ( string id ) : bool
id string A string representing the ID value of the node to which you want to move. This argument does not need to be atomized.
Résultat bool

MoveToNamespace() public méthode

Moves the XPathNavigator to the namespace node with the specified local name. Always returns false for the HtmlNavigator implementation.
public MoveToNamespace ( string name ) : bool
name string The local name of the namespace node.
Résultat bool

MoveToNext() public méthode

Moves to the next sibling of the current node.
public MoveToNext ( ) : bool
Résultat bool

MoveToNextAttribute() public méthode

Moves to the next HTML attribute.
public MoveToNextAttribute ( ) : bool
Résultat bool

MoveToNextNamespace() public méthode

Moves the XPathNavigator to the next namespace node. Always returns falsefor the HtmlNavigator implementation.
public MoveToNextNamespace ( XPathNamespaceScope scope ) : bool
scope XPathNamespaceScope An XPathNamespaceScope value describing the namespace scope.
Résultat bool

MoveToParent() public méthode

Moves to the parent of the current node.
public MoveToParent ( ) : bool
Résultat bool

MoveToPrevious() public méthode

Moves to the previous sibling of the current node.
public MoveToPrevious ( ) : bool
Résultat bool

MoveToRoot() public méthode

Moves to the root node to which the current node belongs.
public MoveToRoot ( ) : void
Résultat void