DotNetBrowser  1.14
Public Member Functions | Properties | List of all members
DotNetBrowser.DOM.DOMDocument Interface Reference

Represents DOM HTML document of the web page. More...

Inherits DotNetBrowser.DOM.SearchContext.

Public Member Functions

List< DOMNodeGetElementsByTagName (string tagName)
 Returns a list of DOM nodes with specific tagName . More...
 
DOMElement GetElementById (string elementId)
 Returns the DOMElement that has an ID attribute with the given value. More...
 
List< DOMNodeGetElementsByName (string name)
 Returns a list of DOM nodes whose name attribute is given by name . More...
 
List< DOMNodeGetElementsByClassName (string className)
 Returns a list of DOM nodes whose class attribute is given by className . More...
 
DOMElement CreateElement (string tagName)
 Creates and returns a new DOM element with the specified tag name. More...
 
DOMNode CreateTextNode ()
 Creates and returns a new Text DOM node with DOMNodeType.TextNode type. More...
 
DOMNode CreateTextNode (string text)
 Returns a new Text DOM node with DOMNodeType.TextNode type. More...
 
- Public Member Functions inherited from DotNetBrowser.DOM.SearchContext
DOMElement GetElementByTagName (string tagName)
 Finds first DOM element in the current document or element with the given tagName . Returns null if element wasn't found using given find method. More...
 
DOMElement GetElementByName (string name)
 Finds first DOM element in the current document or element with the given name . Returns null if element wasn't found using given find method. More...
 
DOMElement GetElementByClassName (string className)
 Finds first DOM element in the current document or element with the given className . Returns null if element wasn't found using given find method. More...
 
XPathResult Evaluate (string expression)
 Evaluates an XPath expression for the document element with XPathResultType.ANY_TYPE and returns the result. Equivalent of: More...
 
XPathResult Evaluate (string expression, XPathResultType type)
 Returns an XPathResult based on an XPath expression and other given parameters. More...
 

Properties

DOMElement DocumentElement [get]
 Gets the document HTML element that usually represents HTML tag. This method can return null if document element is not available (e.g. the web page of this document was disposed). More...
 

Detailed Description

Represents DOM HTML document of the web page.

Member Function Documentation

DOMElement DotNetBrowser.DOM.DOMDocument.CreateElement ( string  tagName)

Creates and returns a new DOM element with the specified tag name.

Parameters
tagNamethe tag name (e.g. "A", "P", "DIV") of the new DOM element.
Returns
the new DOMElement or null if tagName is wrong.
Exceptions
ArgumentExceptionwhen tagName parameter is empty or null.
DOMNode DotNetBrowser.DOM.DOMDocument.CreateTextNode ( )

Creates and returns a new Text DOM node with DOMNodeType.TextNode type.

Returns
the new Text DOM node with DOMNodeType.TextNode type.
DOMNode DotNetBrowser.DOM.DOMDocument.CreateTextNode ( string  text)

Returns a new Text DOM node with DOMNodeType.TextNode type.

Parameters
textthe string, which will be used to initialize node value.
Returns
the new Text DOM node with DOMNodeType.TextNode type.
Exceptions
ArgumentExceptionwhen text parameter is empty or null.
DOMElement DotNetBrowser.DOM.DOMDocument.GetElementById ( string  elementId)

Returns the DOMElement that has an ID attribute with the given value.

Parameters
elementIdThe unique id value for an element.
Returns
the matching element or null if there is none.
List<DOMNode> DotNetBrowser.DOM.DOMDocument.GetElementsByClassName ( string  className)

Returns a list of DOM nodes whose class attribute is given by className .

Parameters
classNamethe class attribute value for a node.
Returns
a list of the matched DOM nodes.
Exceptions
ArgumentExceptionwhen className parameter is empty or null.
List<DOMNode> DotNetBrowser.DOM.DOMDocument.GetElementsByName ( string  name)

Returns a list of DOM nodes whose name attribute is given by name .

Parameters
namethe name attribute value for a node.
Returns
a list of the matched DOM nodes.
Exceptions
ArgumentExceptionwhen name parameter is empty or null.
List<DOMNode> DotNetBrowser.DOM.DOMDocument.GetElementsByTagName ( string  tagName)

Returns a list of DOM nodes with specific tagName .

Parameters
tagNamethe name of the tag to match on.
Returns
a list of the matched DOM nodes.

Property Documentation

DOMElement DotNetBrowser.DOM.DOMDocument.DocumentElement
get

Gets the document HTML element that usually represents HTML tag. This method can return null if document element is not available (e.g. the web page of this document was disposed).

the document HTML element that usually represents HTML tag or null if document element is not available.