dcsoup API documentation
version 0.2.0

[This is preliminary documentation and is subject to change.]

dcsoup is a .NET library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods.

This library is basically a port of jsoup, a Java HTML parser library. see also: http://jsoup.org/

Namespaces
Namespace | Description
Supremes |
Supremes.Fluent |
Supremes.Nodes |
Supremes.Parsers |
Supremes.Safety |
Supremes.Select |

Copyright © 2015 INOMATA Kentaro


Supremes Namespace

Supremes Namespace

Classes
 | Class | Description
Public class | Dcsoup | The core public access point to the Dcsoup functionality.


Dcsoup Class

Dcsoup Class

The core public access point to the Dcsoup functionality.
Inheritance Hierarchy
SystemObject
SupremesDcsoup

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static class Dcsoup
<ExtensionAttribute>
Public NotInheritable Class Dcsoup
[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type Dcsoup =  class end

The Dcsoup type exposes the following members.

Methods
Name | Description
Clean(String, Whitelist) | Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes.
Clean(String, String, Whitelist) | Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes.
Clean(String, String, Whitelist, DocumentOutputSettings) | Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes.
IsValid | Test if the input HTML has only tags and attributes allowed by the Whitelist.
Parse(HttpResponseMessage) | Parse HTML into a Document.
Parse(String) | Parse HTML into a Document.
Parse(String, String) | Parse HTML into a Document.
Parse(Uri, Int32) | Fetch a URL, and parse it as HTML.
Parse(Stream, String, String) | Read an input stream, and parse it to a Document.
Parse(String, String, Parser) | Parse HTML into a Document, using the provided Parser.
Parse(Stream, String, String, Parser) | Read an input stream, and parse it to a Document.
ParseBodyFragment(String) | Parse a fragment of HTML, with the assumption that it forms the body of the HTML.
ParseBodyFragment(String, String) | Parse a fragment of HTML, with the assumption that it forms the body of the HTML.
ParseFile(String, String) | Parse the contents of a file as HTML.
ParseFile(String, String, String) | Parse the contents of a file as HTML.
Top
See Also

Reference

Supremes Namespace


Dcsoup Methods

Dcsoup Methods

The Dcsoup type exposes the following members.

Methods
Name | Description
Clean(String, Whitelist) | Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes.
Clean(String, String, Whitelist) | Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes.
Clean(String, String, Whitelist, DocumentOutputSettings) | Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes.
IsValid | Test if the input HTML has only tags and attributes allowed by the Whitelist.
Parse(HttpResponseMessage) | Parse HTML into a Document.
Parse(String) | Parse HTML into a Document.
Parse(String, String) | Parse HTML into a Document.
Parse(Uri, Int32) | Fetch a URL, and parse it as HTML.
Parse(Stream, String, String) | Read an input stream, and parse it to a Document.
Parse(String, String, Parser) | Parse HTML into a Document, using the provided Parser.
Parse(Stream, String, String, Parser) | Read an input stream, and parse it to a Document.
ParseBodyFragment(String) | Parse a fragment of HTML, with the assumption that it forms the body of the HTML.
ParseBodyFragment(String, String) | Parse a fragment of HTML, with the assumption that it forms the body of the HTML.
ParseFile(String, String) | Parse the contents of a file as HTML.
ParseFile(String, String, String) | Parse the contents of a file as HTML.
Top
See Also

Reference

Dcsoup Class
Supremes Namespace


Dcsoup.Clean Method

DcsoupClean Method

Overload List
Name | Description
Clean(String, Whitelist) | Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes.
Clean(String, String, Whitelist) | Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes.
Clean(String, String, Whitelist, DocumentOutputSettings) | Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes.
Top
See Also

Reference

Dcsoup Class
Supremes Namespace


Dcsoup.Clean Method (String, Whitelist)

DcsoupClean Method (String, Whitelist)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static string Clean(
    string bodyHtml,
    Whitelist whitelist
)
Public Shared Function Clean (
    bodyHtml As String,
    whitelist As Whitelist
) As String
static member Clean :
        bodyHtml : string *
        whitelist : Whitelist -> string

Parameters

bodyHtml
Type: SystemString
input untrusted HTML (body fragment)
whitelist
Type: Supremes.SafetyWhitelist
white-list of permitted HTML elements

Return Value

Type: String
safe HTML (body fragment)
See Also

Reference

Dcsoup Class
Clean Overload
Supremes Namespace
Supremes.Safety.Cleaner.Clean(Supremes.Nodes.Document)


Dcsoup.Clean Method (String, String, Whitelist)

DcsoupClean Method (String, String, Whitelist)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static string Clean(
    string bodyHtml,
    string baseUri,
    Whitelist whitelist
)
Public Shared Function Clean (
    bodyHtml As String,
    baseUri As String,
    whitelist As Whitelist
) As String
static member Clean :
        bodyHtml : string *
        baseUri : string *
        whitelist : Whitelist -> string

Parameters

bodyHtml
Type: SystemString
input untrusted HTML (body fragment)
baseUri
Type: SystemString
URL to resolve relative URLs against
whitelist
Type: Supremes.SafetyWhitelist
white-list of permitted HTML elements

Return Value

Type: String
safe HTML (body fragment)
See Also

Reference

Dcsoup Class
Clean Overload
Supremes Namespace
Supremes.Safety.Cleaner.Clean(Supremes.Nodes.Document)


Dcsoup.Clean Method (String, String, Whitelist, DocumentOutputSettings)

DcsoupClean Method (String, String, Whitelist, DocumentOutputSettings)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Get safe HTML from untrusted input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static string Clean(
    string bodyHtml,
    string baseUri,
    Whitelist whitelist,
    DocumentOutputSettings outputSettings
)
Public Shared Function Clean (
    bodyHtml As String,
    baseUri As String,
    whitelist As Whitelist,
    outputSettings As DocumentOutputSettings
) As String
static member Clean :
        bodyHtml : string *
        baseUri : string *
        whitelist : Whitelist *
        outputSettings : DocumentOutputSettings -> string

Parameters

bodyHtml
Type: SystemString
input untrusted HTML (body fragment)
baseUri
Type: SystemString
URL to resolve relative URLs against
whitelist
Type: Supremes.SafetyWhitelist
white-list of permitted HTML elements
outputSettings
Type: Supremes.NodesDocumentOutputSettings
document output settings; use to control pretty-printing and entity escape modes

Return Value

Type: String
safe HTML (body fragment)
See Also

Reference

Dcsoup Class
Clean Overload
Supremes Namespace
Supremes.Safety.Cleaner.Clean(Supremes.Nodes.Document)


Dcsoup.IsValid Method

DcsoupIsValid Method

Test if the input HTML has only tags and attributes allowed by the Whitelist.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static bool IsValid(
    string bodyHtml,
    Whitelist whitelist
)
Public Shared Function IsValid (
    bodyHtml As String,
    whitelist As Whitelist
) As Boolean
static member IsValid :
        bodyHtml : string *
        whitelist : Whitelist -> bool

Parameters

bodyHtml
Type: SystemString
HTML to test
whitelist
Type: Supremes.SafetyWhitelist
whitelist to test against

Return Value

Type: Boolean
true if no tags or attributes were removed; false otherwise
Remarks
Useful for form validation. The input HTML should still be run through the cleaner to set up enforced attributes, and to tidy the output.
See Also

Reference

Dcsoup Class
Supremes Namespace
DcsoupClean(String, Whitelist)


Dcsoup.Parse Method

DcsoupParse Method

Overload List
Name | Description
Parse(HttpResponseMessage) | Parse HTML into a Document.
Parse(String) | Parse HTML into a Document.
Parse(String, String) | Parse HTML into a Document.
Parse(Uri, Int32) | Fetch a URL, and parse it as HTML.
Parse(Stream, String, String) | Read an input stream, and parse it to a Document.
Parse(String, String, Parser) | Parse HTML into a Document, using the provided Parser.
Parse(Stream, String, String, Parser) | Read an input stream, and parse it to a Document.
Top
See Also

Reference

Dcsoup Class
Supremes Namespace


Dcsoup.Parse Method (HttpResponseMessage)

DcsoupParse Method (HttpResponseMessage)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Parse HTML into a Document.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document Parse(
    this HttpResponseMessage self
)
<ExtensionAttribute>
Public Shared Function Parse (
    self As HttpResponseMessage
) As Document
[<ExtensionAttribute>]
static member Parse :
        self : HttpResponseMessage -> Document

Parameters

self
Type: System.Net.HttpHttpResponseMessage
The input HttpResponseMessage, which acts as the this instance for the extension method.

Return Value

Type: Document
sane HTML document

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type HttpResponseMessage. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

Dcsoup Class
Parse Overload
Supremes Namespace


Dcsoup.Parse Method (String)

DcsoupParse Method (String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Parse HTML into a Document.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document Parse(
    string html
)
Public Shared Function Parse (
    html As String
) As Document
static member Parse :
        html : string -> Document

Parameters

html
Type: SystemString
HTML to parse

Return Value

Type: Document
sane HTML
Remarks
As no base URI is specified, absolute URL detection relies on the HTML including a <base href> tag.
See Also

Reference

Dcsoup Class
Parse Overload
Supremes Namespace
Parse(string, string)


Dcsoup.Parse Method (String, String)

DcsoupParse Method (String, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Parse HTML into a Document.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document Parse(
    string html,
    string baseUri
)
Public Shared Function Parse (
    html As String,
    baseUri As String
) As Document
static member Parse :
        html : string *
        baseUri : string -> Document

Parameters

html
Type: SystemString
HTML to parse
baseUri
Type: SystemString
The URL where the HTML was retrieved from. Used to resolve relative URLs to absolute URLs, that occur before the HTML declares a <base href> tag.

Return Value

Type: Document
sane HTML
Remarks
The parser will make a sensible, balanced document tree out of any HTML.
See Also

Reference

Dcsoup Class
Parse Overload
Supremes Namespace


Dcsoup.Parse Method (Uri, Int32)

DcsoupParse Method (Uri, Int32)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Fetch a URL, and parse it as HTML.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document Parse(
    Uri url,
    int timeoutMillis
)
Public Shared Function Parse (
    url As Uri,
    timeoutMillis As Integer
) As Document
static member Parse :
        url : Uri *
        timeoutMillis : int -> Document

Parameters

url
Type: SystemUri
URL to fetch (with a GET). The protocol must be http or https .
timeoutMillis
Type: SystemInt32
Connection and read timeout, in milliseconds. If exceeded, IOException is thrown.

Return Value

Type: Document
The parsed HTML.
Exceptions
Exception | Condition
UriFormatException | if the request URL is not a HTTP or HTTPS URL, or is otherwise malformed
Exception | (HttpStatusException)if the response is not OK and HTTP response errors are not ignored (UnsupportedMimeTypeException)if the response mime type is not supported and those errors are not ignored
TimeoutException | if the connection times out
IOException | if a connection or read error occurs
Remarks

Provided for compatibility.

The encoding character set is determined by the content-type header or http-equiv meta tag, or falls back to UTF-8 .

See Also

Reference

Dcsoup Class
Parse Overload
Supremes Namespace


Dcsoup.Parse Method (Stream, String, String)

DcsoupParse Method (Stream, String, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Read an input stream, and parse it to a Document.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document Parse(
    Stream in,
    string charsetName,
    string baseUri
)
Public Shared Function Parse (
    in As Stream,
    charsetName As String,
    baseUri As String
) As Document
static member Parse :
        in : Stream *
        charsetName : string *
        baseUri : string -> Document

Parameters

in
Type: System.IOStream
input stream to read. Make sure to close it after parsing.
charsetName
Type: SystemString
(optional) character set of file contents. Set to null to determine from http-equiv meta tag, if present, or fall back to UTF-8 (which is often safe to do).
baseUri
Type: SystemString
The URL where the HTML was retrieved from, to resolve relative links against.

Return Value

Type: Document
sane HTML
Exceptions
Exception | Condition
IOException | if the file could not be found, or read, or if the charsetName is invalid.
See Also

Reference

Dcsoup Class
Parse Overload
Supremes Namespace


Dcsoup.Parse Method (String, String, Parser)

DcsoupParse Method (String, String, Parser)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Parse HTML into a Document, using the provided Parser.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document Parse(
    string html,
    string baseUri,
    Parser parser
)
Public Shared Function Parse (
    html As String,
    baseUri As String,
    parser As Parser
) As Document
static member Parse :
        html : string *
        baseUri : string *
        parser : Parser -> Document

Parameters

html
Type: SystemString
HTML to parse
baseUri
Type: SystemString
The URL where the HTML was retrieved from. Used to resolve relative URLs to absolute URLs, that occur before the HTML declares a <base href> tag.
parser
Type: Supremes.ParsersParser
alternate parser to use.

Return Value

Type: Document
sane HTML
Remarks
You can provide an alternate parser, such as a simple XML (non-HTML) parser.
See Also

Reference

Dcsoup Class
Parse Overload
Supremes Namespace


Dcsoup.Parse Method (Stream, String, String, Parser)

DcsoupParse Method (Stream, String, String, Parser)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Read an input stream, and parse it to a Document.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document Parse(
    Stream in,
    string charsetName,
    string baseUri,
    Parser parser
)
Public Shared Function Parse (
    in As Stream,
    charsetName As String,
    baseUri As String,
    parser As Parser
) As Document
static member Parse :
        in : Stream *
        charsetName : string *
        baseUri : string *
        parser : Parser -> Document

Parameters

in
Type: System.IOStream
input stream to read. Make sure to close it after parsing.
charsetName
Type: SystemString
(optional) character set of file contents. Set to null to determine from http-equiv meta tag, if present, or fall back to UTF-8 (which is often safe to do).
baseUri
Type: SystemString
The URL where the HTML was retrieved from, to resolve relative links against.
parser
Type: Supremes.ParsersParser
alternate parser to use.

Return Value

Type: Document
sane HTML
Exceptions
Exception | Condition
IOException | if the file could not be found, or read, or if the charsetName is invalid.
Remarks
You can provide an alternate parser, such as a simple XML (non-HTML) parser.
See Also

Reference

Dcsoup Class
Parse Overload
Supremes Namespace


Dcsoup.ParseBodyFragment Method

DcsoupParseBodyFragment Method

Overload List
Name | Description
ParseBodyFragment(String) | Parse a fragment of HTML, with the assumption that it forms the body of the HTML.
ParseBodyFragment(String, String) | Parse a fragment of HTML, with the assumption that it forms the body of the HTML.
Top
See Also

Reference

Dcsoup Class
Supremes Namespace


Dcsoup.ParseBodyFragment Method (String)

DcsoupParseBodyFragment Method (String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Parse a fragment of HTML, with the assumption that it forms the body of the HTML.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document ParseBodyFragment(
    string bodyHtml
)
Public Shared Function ParseBodyFragment (
    bodyHtml As String
) As Document
static member ParseBodyFragment :
        bodyHtml : string -> Document

Parameters

bodyHtml
Type: SystemString
body HTML fragment

Return Value

Type: Document
sane HTML document
See Also

Reference

Dcsoup Class
ParseBodyFragment Overload
Supremes Namespace
Supremes.Nodes.Document.Body


Dcsoup.ParseBodyFragment Method (String, String)

DcsoupParseBodyFragment Method (String, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Parse a fragment of HTML, with the assumption that it forms the body of the HTML.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document ParseBodyFragment(
    string bodyHtml,
    string baseUri
)
Public Shared Function ParseBodyFragment (
    bodyHtml As String,
    baseUri As String
) As Document
static member ParseBodyFragment :
        bodyHtml : string *
        baseUri : string -> Document

Parameters

bodyHtml
Type: SystemString
body HTML fragment
baseUri
Type: SystemString
URL to resolve relative URLs against.

Return Value

Type: Document
sane HTML document
See Also

Reference

Dcsoup Class
ParseBodyFragment Overload
Supremes Namespace
Supremes.Nodes.Document.Body


Dcsoup.ParseFile Method

DcsoupParseFile Method

Overload List
Name | Description
ParseFile(String, String) | Parse the contents of a file as HTML.
ParseFile(String, String, String) | Parse the contents of a file as HTML.
Top
See Also

Reference

Dcsoup Class
Supremes Namespace


Dcsoup.ParseFile Method (String, String)

DcsoupParseFile Method (String, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Parse the contents of a file as HTML.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document ParseFile(
    string in,
    string charsetName
)
Public Shared Function ParseFile (
    in As String,
    charsetName As String
) As Document
static member ParseFile :
        in : string *
        charsetName : string -> Document

Parameters

in
Type: SystemString
file to load HTML from
charsetName
Type: SystemString
(optional) character set of file contents. Set to null to determine from http-equiv meta tag, if present, or fall back to UTF-8 (which is often safe to do).

Return Value

Type: Document
sane HTML
Exceptions
Exception | Condition
IOException | if the file could not be found, or read, or if the charsetName is invalid.
Remarks
The location of the file is used as the base URI to qualify relative URLs.
See Also

Reference

Dcsoup Class
ParseFile Overload
Supremes Namespace
ParseFile(string, string, string)


Dcsoup.ParseFile Method (String, String, String)

DcsoupParseFile Method (String, String, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Parse the contents of a file as HTML.

Namespace: Supremes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document ParseFile(
    string in,
    string charsetName,
    string baseUri
)
Public Shared Function ParseFile (
    in As String,
    charsetName As String,
    baseUri As String
) As Document
static member ParseFile :
        in : string *
        charsetName : string *
        baseUri : string -> Document

Parameters

in
Type: SystemString
file to load HTML from
charsetName
Type: SystemString
(optional) character set of file contents. Set to null to determine from http-equiv meta tag, if present, or fall back to UTF-8 (which is often safe to do).
baseUri
Type: SystemString
The URL where the HTML was retrieved from, to resolve relative links against.

Return Value

Type: Document
sane HTML
Exceptions
Exception | Condition
IOException | if the file could not be found, or read, or if the charsetName is invalid.
See Also

Reference

Dcsoup Class
ParseFile Overload
Supremes Namespace


Supremes.Fluent Namespace

Supremes.Fluent Namespace

Classes
 | Class | Description
Public class | FluentUtility | Provides a set of static methods for jQuery-like method chainings.


FluentUtility Class

FluentUtility Class

Provides a set of static methods for jQuery-like method chainings.
Inheritance Hierarchy
SystemObject
Supremes.FluentFluentUtility

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static class FluentUtility
<ExtensionAttribute>
Public NotInheritable Class FluentUtility
[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type FluentUtility =  class end

The FluentUtility type exposes the following members.

Methods
Name | Description
Charset(DocumentOutputSettings, String) | Set the current output charset of the specified document settings, and returns the document settings itself.
Charset(DocumentOutputSettings, Encoding) | Set the current output charset of the specified document settings, and returns the document settings itself.
ClassNames | Set all of the specified element's class names, and returns the element itself.
EscapeMode | Set the current HTML escape mode of the specified document settings, and returns the document settings itself.
Html(Element, String) | Set the specified element's inner HTML, and returns the element itself.
Html(Elements, String) | Set the inner HTML of each matched element, and returns the elements itself.
IndentAmount | Set the current tag indent amount of the specified document settings, used when pretty printing, and returns the document settings itself.
Outline | Set if outline mode is enabled to the specified document settings, and returns the document settings itself.
OutputSettings | Set the specified document's current output settings, and returns the document itself.
PrettyPrint | Set if pretty printing is enabled to the specified document settings, and returns the document settings itself.
QuirksMode | Set the specified document's quirks mode, and returns the document itself.
Syntax | Set the current output syntax of the specified document settings, and returns the document settings itself.
TagName(Element, String) | Set the name of the tag for the specified element, and returns the element itself.
TagName(Elements, String) | Set the tag name of each matched element, and returns the elements itself.
Text(Document, String) | Set the combined text of the specified document and all its children, and returns the document itself.
Text(TextNode, String) | Set text content of the specified text node, and returns the text node itself.
Val(Element, String) | Set the value of the specified form element (input, textarea, etc), and returns the element itself.
Val(Elements, String) | Set the form element's value in each of the matched elements, and returns the elements itself.
WholeData | Set the data contents of the specified node, and returns the node itself.
Top
See Also

Reference

Supremes.Fluent Namespace


FluentUtility Methods

FluentUtility Methods

The FluentUtility type exposes the following members.

Methods
Name | Description
Charset(DocumentOutputSettings, String) | Set the current output charset of the specified document settings, and returns the document settings itself.
Charset(DocumentOutputSettings, Encoding) | Set the current output charset of the specified document settings, and returns the document settings itself.
ClassNames | Set all of the specified element's class names, and returns the element itself.
EscapeMode | Set the current HTML escape mode of the specified document settings, and returns the document settings itself.
Html(Element, String) | Set the specified element's inner HTML, and returns the element itself.
Html(Elements, String) | Set the inner HTML of each matched element, and returns the elements itself.
IndentAmount | Set the current tag indent amount of the specified document settings, used when pretty printing, and returns the document settings itself.
Outline | Set if outline mode is enabled to the specified document settings, and returns the document settings itself.
OutputSettings | Set the specified document's current output settings, and returns the document itself.
PrettyPrint | Set if pretty printing is enabled to the specified document settings, and returns the document settings itself.
QuirksMode | Set the specified document's quirks mode, and returns the document itself.
Syntax | Set the current output syntax of the specified document settings, and returns the document settings itself.
TagName(Element, String) | Set the name of the tag for the specified element, and returns the element itself.
TagName(Elements, String) | Set the tag name of each matched element, and returns the elements itself.
Text(Document, String) | Set the combined text of the specified document and all its children, and returns the document itself.
Text(TextNode, String) | Set text content of the specified text node, and returns the text node itself.
Val(Element, String) | Set the value of the specified form element (input, textarea, etc), and returns the element itself.
Val(Elements, String) | Set the form element's value in each of the matched elements, and returns the elements itself.
WholeData | Set the data contents of the specified node, and returns the node itself.
Top
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace


FluentUtility.Charset Method

FluentUtilityCharset Method

Overload List
Name | Description
Charset(DocumentOutputSettings, String) | Set the current output charset of the specified document settings, and returns the document settings itself.
Charset(DocumentOutputSettings, Encoding) | Set the current output charset of the specified document settings, and returns the document settings itself.
Top
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace


FluentUtility.Charset Method (DocumentOutputSettings, String)

FluentUtilityCharset Method (DocumentOutputSettings, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set the current output charset of the specified document settings, and returns the document settings itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static DocumentOutputSettings Charset(
    this DocumentOutputSettings self,
    string charset
)
<ExtensionAttribute>
Public Shared Function Charset (
    self As DocumentOutputSettings,
    charset As String
) As DocumentOutputSettings
[<ExtensionAttribute>]
static member Charset :
        self : DocumentOutputSettings *
        charset : string -> DocumentOutputSettings

Parameters

self
Type: Supremes.NodesDocumentOutputSettings
The input DocumentOutputSettings, which acts as the this instance for the extension method.
charset
Type: SystemString
the new charset name to use

Return Value

Type: DocumentOutputSettings
The input DocumentOutputSettings, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DocumentOutputSettings. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Charset Overload
Supremes.Fluent Namespace
DocumentOutputSettings.Charset


FluentUtility.Charset Method (DocumentOutputSettings, Encoding)

FluentUtilityCharset Method (DocumentOutputSettings, Encoding)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set the current output charset of the specified document settings, and returns the document settings itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static DocumentOutputSettings Charset(
    this DocumentOutputSettings self,
    Encoding charset
)
<ExtensionAttribute>
Public Shared Function Charset (
    self As DocumentOutputSettings,
    charset As Encoding
) As DocumentOutputSettings
[<ExtensionAttribute>]
static member Charset :
        self : DocumentOutputSettings *
        charset : Encoding -> DocumentOutputSettings

Parameters

self
Type: Supremes.NodesDocumentOutputSettings
The input DocumentOutputSettings, which acts as the this instance for the extension method.
charset
Type: System.TextEncoding
the new charset to use

Return Value

Type: DocumentOutputSettings
The input DocumentOutputSettings, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DocumentOutputSettings. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Charset Overload
Supremes.Fluent Namespace
DocumentOutputSettings.Charset


FluentUtility.ClassNames Method

FluentUtilityClassNames Method

Set all of the specified element's class names, and returns the element itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Element ClassNames(
    this Element self,
    ICollection<string> classNames
)
<ExtensionAttribute>
Public Shared Function ClassNames (
    self As Element,
    classNames As ICollection(Of String)
) As Element
[<ExtensionAttribute>]
static member ClassNames :
        self : Element *
        classNames : ICollection<string> -> Element

Parameters

self
Type: Supremes.NodesElement
The input Element, which acts as the this instance for the extension method.
classNames
Type: System.Collections.GenericICollection String
the new set of classes

Return Value

Type: Element
The input Element, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Element. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace
Element.ClassNames


FluentUtility.EscapeMode Method

FluentUtilityEscapeMode Method

Set the current HTML escape mode of the specified document settings, and returns the document settings itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static DocumentOutputSettings EscapeMode(
    this DocumentOutputSettings self,
    DocumentEscapeMode escapeMode
)
<ExtensionAttribute>
Public Shared Function EscapeMode (
    self As DocumentOutputSettings,
    escapeMode As DocumentEscapeMode
) As DocumentOutputSettings
[<ExtensionAttribute>]
static member EscapeMode :
        self : DocumentOutputSettings *
        escapeMode : DocumentEscapeMode -> DocumentOutputSettings

Parameters

self
Type: Supremes.NodesDocumentOutputSettings
The input DocumentOutputSettings, which acts as the this instance for the extension method.
escapeMode
Type: Supremes.NodesDocumentEscapeMode
the new escape mode to use

Return Value

Type: DocumentOutputSettings
The input DocumentOutputSettings, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DocumentOutputSettings. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace
DocumentOutputSettings.EscapeMode


FluentUtility.Html Method

FluentUtilityHtml Method

Overload List
Name | Description
Html(Element, String) | Set the specified element's inner HTML, and returns the element itself.
Html(Elements, String) | Set the inner HTML of each matched element, and returns the elements itself.
Top
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace


FluentUtility.Html Method (Element, String)

FluentUtilityHtml Method (Element, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set the specified element's inner HTML, and returns the element itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Element Html(
    this Element self,
    string html
)
<ExtensionAttribute>
Public Shared Function Html (
    self As Element,
    html As String
) As Element
[<ExtensionAttribute>]
static member Html :
        self : Element *
        html : string -> Element

Parameters

self
Type: Supremes.NodesElement
The input Element, which acts as the this instance for the extension method.
html
Type: SystemString
HTML to parse and set into this element

Return Value

Type: Element
The input Element, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Element. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Html Overload
Supremes.Fluent Namespace
Element.Html


FluentUtility.Html Method (Elements, String)

FluentUtilityHtml Method (Elements, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set the inner HTML of each matched element, and returns the elements itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Elements Html(
    this Elements self,
    string html
)
<ExtensionAttribute>
Public Shared Function Html (
    self As Elements,
    html As String
) As Elements
[<ExtensionAttribute>]
static member Html :
        self : Elements *
        html : string -> Elements

Parameters

self
Type: Supremes.NodesElements
The input Elements, which acts as the this instance for the extension method.
html
Type: SystemString
HTML to parse and set into each matched element

Return Value

Type: Elements
The input Elements, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Elements. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Html Overload
Supremes.Fluent Namespace
Elements.Html


FluentUtility.IndentAmount Method

FluentUtilityIndentAmount Method

Set the current tag indent amount of the specified document settings, used when pretty printing, and returns the document settings itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static DocumentOutputSettings IndentAmount(
    this DocumentOutputSettings self,
    int indentAmount
)
<ExtensionAttribute>
Public Shared Function IndentAmount (
    self As DocumentOutputSettings,
    indentAmount As Integer
) As DocumentOutputSettings
[<ExtensionAttribute>]
static member IndentAmount :
        self : DocumentOutputSettings *
        indentAmount : int -> DocumentOutputSettings

Parameters

self
Type: Supremes.NodesDocumentOutputSettings
The input DocumentOutputSettings, which acts as the this instance for the extension method.
indentAmount
Type: SystemInt32
number of spaces to use for indenting each level

Return Value

Type: DocumentOutputSettings
The input DocumentOutputSettings, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DocumentOutputSettings. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace
DocumentOutputSettings.IndentAmount


FluentUtility.Outline Method

FluentUtilityOutline Method

Set if outline mode is enabled to the specified document settings, and returns the document settings itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static DocumentOutputSettings Outline(
    this DocumentOutputSettings self,
    bool outlineMode
)
<ExtensionAttribute>
Public Shared Function Outline (
    self As DocumentOutputSettings,
    outlineMode As Boolean
) As DocumentOutputSettings
[<ExtensionAttribute>]
static member Outline :
        self : DocumentOutputSettings *
        outlineMode : bool -> DocumentOutputSettings

Parameters

self
Type: Supremes.NodesDocumentOutputSettings
The input DocumentOutputSettings, which acts as the this instance for the extension method.
outlineMode
Type: SystemBoolean
the new outline mode

Return Value

Type: DocumentOutputSettings
The input DocumentOutputSettings, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DocumentOutputSettings. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace
DocumentOutputSettings.Outline


FluentUtility.OutputSettings Method

FluentUtilityOutputSettings Method

Set the specified document's current output settings, and returns the document itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document OutputSettings(
    this Document self,
    DocumentOutputSettings outputSettings
)
<ExtensionAttribute>
Public Shared Function OutputSettings (
    self As Document,
    outputSettings As DocumentOutputSettings
) As Document
[<ExtensionAttribute>]
static member OutputSettings :
        self : Document *
        outputSettings : DocumentOutputSettings -> Document

Parameters

self
Type: Supremes.NodesDocument
The input Document, which acts as the this instance for the extension method.
outputSettings
Type: Supremes.NodesDocumentOutputSettings
new output settings

Return Value

Type: Document
The input Document, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Document. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace
Document.OutputSettings


FluentUtility.PrettyPrint Method

FluentUtilityPrettyPrint Method

Set if pretty printing is enabled to the specified document settings, and returns the document settings itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static DocumentOutputSettings PrettyPrint(
    this DocumentOutputSettings self,
    bool pretty
)
<ExtensionAttribute>
Public Shared Function PrettyPrint (
    self As DocumentOutputSettings,
    pretty As Boolean
) As DocumentOutputSettings
[<ExtensionAttribute>]
static member PrettyPrint :
        self : DocumentOutputSettings *
        pretty : bool -> DocumentOutputSettings

Parameters

self
Type: Supremes.NodesDocumentOutputSettings
The input DocumentOutputSettings, which acts as the this instance for the extension method.
pretty
Type: SystemBoolean
the new pretty print setting

Return Value

Type: DocumentOutputSettings
The input DocumentOutputSettings, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DocumentOutputSettings. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace
DocumentOutputSettings.PrettyPrint


FluentUtility.QuirksMode Method

FluentUtilityQuirksMode Method

Set the specified document's quirks mode, and returns the document itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document QuirksMode(
    this Document self,
    DocumentQuirksMode quirksMode
)
<ExtensionAttribute>
Public Shared Function QuirksMode (
    self As Document,
    quirksMode As DocumentQuirksMode
) As Document
[<ExtensionAttribute>]
static member QuirksMode :
        self : Document *
        quirksMode : DocumentQuirksMode -> Document

Parameters

self
Type: Supremes.NodesDocument
The input Document, which acts as the this instance for the extension method.
quirksMode
Type: Supremes.NodesDocumentQuirksMode
new quirks mode

Return Value

Type: Document
The input Document, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Document. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace
Document.QuirksMode


FluentUtility.Syntax Method

FluentUtilitySyntax Method

Set the current output syntax of the specified document settings, and returns the document settings itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static DocumentOutputSettings Syntax(
    this DocumentOutputSettings self,
    DocumentSyntax syntax
)
<ExtensionAttribute>
Public Shared Function Syntax (
    self As DocumentOutputSettings,
    syntax As DocumentSyntax
) As DocumentOutputSettings
[<ExtensionAttribute>]
static member Syntax :
        self : DocumentOutputSettings *
        syntax : DocumentSyntax -> DocumentOutputSettings

Parameters

self
Type: Supremes.NodesDocumentOutputSettings
The input DocumentOutputSettings, which acts as the this instance for the extension method.
syntax
Type: Supremes.NodesDocumentSyntax
the new syntax to use

Return Value

Type: DocumentOutputSettings
The input DocumentOutputSettings, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DocumentOutputSettings. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace
DocumentOutputSettings.Syntax


FluentUtility.TagName Method

FluentUtilityTagName Method

Overload List
Name | Description
TagName(Element, String) | Set the name of the tag for the specified element, and returns the element itself.
TagName(Elements, String) | Set the tag name of each matched element, and returns the elements itself.
Top
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace


FluentUtility.TagName Method (Element, String)

FluentUtilityTagName Method (Element, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set the name of the tag for the specified element, and returns the element itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Element TagName(
    this Element self,
    string tagName
)
<ExtensionAttribute>
Public Shared Function TagName (
    self As Element,
    tagName As String
) As Element
[<ExtensionAttribute>]
static member TagName :
        self : Element *
        tagName : string -> Element

Parameters

self
Type: Supremes.NodesElement
The input Element, which acts as the this instance for the extension method.
tagName
Type: SystemString
the new tag name

Return Value

Type: Element
The input Element, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Element. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
TagName Overload
Supremes.Fluent Namespace
Element.TagName


FluentUtility.TagName Method (Elements, String)

FluentUtilityTagName Method (Elements, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set the tag name of each matched element, and returns the elements itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Elements TagName(
    this Elements self,
    string tagName
)
<ExtensionAttribute>
Public Shared Function TagName (
    self As Elements,
    tagName As String
) As Elements
[<ExtensionAttribute>]
static member TagName :
        self : Elements *
        tagName : string -> Elements

Parameters

self
Type: Supremes.NodesElements
The input Elements, which acts as the this instance for the extension method.
tagName
Type: SystemString
the new tag name to set into each matched element

Return Value

Type: Elements
The input Elements, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Elements. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
TagName Overload
Supremes.Fluent Namespace
Elements.TagName


FluentUtility.Text Method

FluentUtilityText Method

Overload List
Name | Description
Text(Document, String) | Set the combined text of the specified document and all its children, and returns the document itself.
Text(TextNode, String) | Set text content of the specified text node, and returns the text node itself.
Top
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace


FluentUtility.Text Method (Document, String)

FluentUtilityText Method (Document, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set the combined text of the specified document and all its children, and returns the document itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document Text(
    this Document self,
    string text
)
<ExtensionAttribute>
Public Shared Function Text (
    self As Document,
    text As String
) As Document
[<ExtensionAttribute>]
static member Text :
        self : Document *
        text : string -> Document

Parameters

self
Type: Supremes.NodesDocument
The input Document, which acts as the this instance for the extension method.
text
Type: SystemString
unencoded text

Return Value

Type: Document
The input Document, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Document. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Text Overload
Supremes.Fluent Namespace
Document.Text


FluentUtility.Text Method (TextNode, String)

FluentUtilityText Method (TextNode, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set text content of the specified text node, and returns the text node itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static TextNode Text(
    this TextNode self,
    string text
)
<ExtensionAttribute>
Public Shared Function Text (
    self As TextNode,
    text As String
) As TextNode
[<ExtensionAttribute>]
static member Text :
        self : TextNode *
        text : string -> TextNode

Parameters

self
Type: Supremes.NodesTextNode
The input TextNode, which acts as the this instance for the extension method.
text
Type: SystemString
unencoded text

Return Value

Type: TextNode
The input TextNode, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TextNode. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Text Overload
Supremes.Fluent Namespace
TextNode.Text


FluentUtility.Val Method

FluentUtilityVal Method

Overload List
Name | Description
Val(Element, String) | Set the value of the specified form element (input, textarea, etc), and returns the element itself.
Val(Elements, String) | Set the form element's value in each of the matched elements, and returns the elements itself.
Top
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace


FluentUtility.Val Method (Element, String)

FluentUtilityVal Method (Element, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set the value of the specified form element (input, textarea, etc), and returns the element itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Element Val(
    this Element self,
    string value
)
<ExtensionAttribute>
Public Shared Function Val (
    self As Element,
    value As String
) As Element
[<ExtensionAttribute>]
static member Val :
        self : Element *
        value : string -> Element

Parameters

self
Type: Supremes.NodesElement
The input Element, which acts as the this instance for the extension method.
value
Type: SystemString
the new value to set

Return Value

Type: Element
The input Element, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Element. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Val Overload
Supremes.Fluent Namespace
Element.Val


FluentUtility.Val Method (Elements, String)

FluentUtilityVal Method (Elements, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set the form element's value in each of the matched elements, and returns the elements itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Elements Val(
    this Elements self,
    string value
)
<ExtensionAttribute>
Public Shared Function Val (
    self As Elements,
    value As String
) As Elements
[<ExtensionAttribute>]
static member Val :
        self : Elements *
        value : string -> Elements

Parameters

self
Type: Supremes.NodesElements
The input Elements, which acts as the this instance for the extension method.
value
Type: SystemString
the new value to set into each matched element

Return Value

Type: Elements
The input Elements, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Elements. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Val Overload
Supremes.Fluent Namespace
Elements.Val


FluentUtility.WholeData Method

FluentUtilityWholeData Method

Set the data contents of the specified node, and returns the node itself.

Namespace: Supremes.Fluent
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static DataNode WholeData(
    this DataNode self,
    string data
)
<ExtensionAttribute>
Public Shared Function WholeData (
    self As DataNode,
    data As String
) As DataNode
[<ExtensionAttribute>]
static member WholeData :
        self : DataNode *
        data : string -> DataNode

Parameters

self
Type: Supremes.NodesDataNode
The input DataNode, which acts as the this instance for the extension method.
data
Type: SystemString
unencoded data

Return Value

Type: DataNode
The input DataNode, for method chaining.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataNode. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

FluentUtility Class
Supremes.Fluent Namespace
DataNode.WholeData


Supremes.Nodes Namespace

Supremes.Nodes Namespace
version 0.2.0

[This is preliminary documentation and is subject to change.]

Classes
 | Class | Description
Public class | Attribute | A single key + value attribute.
Public class | Attributes | The attributes of an Element.
Public class | Comment | A comment node.
Public class | DataNode | A data node, for contents of style, script tags etc, where contents should not show in text().
Public class | Document | A HTML Document.
Public class | DocumentOutputSettings | A Document's output settings control the form of the text() and html() methods.
Public class | Element | A HTML element consists of a tag name, attributes, and child nodes (including text nodes and other elements).
Public class | Elements | A list of Element s, with methods that act on every element in the list. To get an Elements object, use the Element.Select(string) method.
Public class | FormElement | A HTML Form Element provides ready access to the form fields/controls that are associated with it.
Public class | Node | The base, abstract Node model.
Public class | Tag | HTML Tag capabilities.
Public class | TextNode | A text node.
Public class | XmlDeclaration | An XML Declaration.
Enumerations
 | Enumeration | Description
Public enumeration | DocumentEscapeMode | Specifies the document's current HTML escape mode.
Public enumeration | DocumentQuirksMode | Specifies how browsers should display an HTML file.
Public enumeration | DocumentSyntax | Specifies the output serialization syntax.


Attribute Class

Attribute Class

A single key + value attribute.
Inheritance Hierarchy
SystemObject
Supremes.NodesAttribute

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class Attribute
Public NotInheritable Class Attribute
[<SealedAttribute>]
type Attribute =  class end

The Attribute type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Compares two Attribute instances for equality. (Overrides ObjectEquals(Object).)
Public method | GetHashCode | Returns the hash code for this instance. (Overrides ObjectGetHashCode.)
Public method | GetType | (Inherited from Object.)
Public method | ToString | Get the string representation of this attribute, implemented as Html . (Overrides ObjectToString.)
Top
Properties
 | Name | Description
Public property | Html | Get the HTML representation of this attribute.
Public property | Key | Get or set the attribute key.
Public property | Value | Get or set the attribute value.
Top
Remarks
Keys are trimmed and normalised to lower-case.
See Also

Reference

Supremes.Nodes Namespace


Attribute Methods

Attribute Methods

The Attribute type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Compares two Attribute instances for equality. (Overrides ObjectEquals(Object).)
Public method | GetHashCode | Returns the hash code for this instance. (Overrides ObjectGetHashCode.)
Public method | GetType | (Inherited from Object.)
Public method | ToString | Get the string representation of this attribute, implemented as Html . (Overrides ObjectToString.)
Top
See Also

Reference

Attribute Class


Attribute.Equals Method

AttributeEquals Method

Compares two Attribute instances for equality.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override bool Equals(
    Object obj
)
Public Overrides Function Equals (
    obj As Object
) As Boolean
abstract Equals :
        obj : Object -> bool
override Equals :
        obj : Object -> bool

Parameters

obj
Type: SystemObject

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Supremes.Nodes.Attribute.Equals(System.Object)"]

See Also

Reference

Attribute Class


Attribute.GetHashCode Method

AttributeGetHashCode Method

Returns the hash code for this instance.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override int GetHashCode()
Public Overrides Function GetHashCode As Integer
abstract GetHashCode : unit -> int
override GetHashCode : unit -> int

Return Value

Type: Int32

[Missing <returns> documentation for "M:Supremes.Nodes.Attribute.GetHashCode"]

See Also

Reference

Attribute Class


Attribute.ToString Method

AttributeToString Method

Get the string representation of this attribute, implemented as Html .

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string ToString()
Public Overrides Function ToString As String
abstract ToString : unit -> string
override ToString : unit -> string

Return Value

Type: String
string
See Also

Reference

Attribute Class


Attribute Properties

Attribute Properties

The Attribute type exposes the following members.

Properties
 | Name | Description
Public property | Html | Get the HTML representation of this attribute.
Public property | Key | Get or set the attribute key.
Public property | Value | Get or set the attribute value.
Top
See Also

Reference

Attribute Class


Attribute.Html Property

AttributeHtml Property

Get the HTML representation of this attribute.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Html { get; }
Public ReadOnly Property Html As String
    Get
member Html : string with get

Return Value

Type: String
HTML
Remarks
e.g. href="index.html".
See Also

Reference

Attribute Class


Attribute.Key Property

AttributeKey Property

Get or set the attribute key.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Key { get; set; }
Public Property Key As String
    Get
    Set
member Key : string with get, set

Property Value

Type: String
the new key; must not be null when set

Return Value

Type: String
the attribute key
See Also

Reference

Attribute Class


Attribute.Value Property

AttributeValue Property

Get or set the attribute value.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Value { get; set; }
Public Property Value As String
    Get
    Set
member Value : string with get, set

Property Value

Type: String
the new attribute value; must not be null when set

Return Value

Type: String
the attribute value
See Also

Reference

Attribute Class


Attributes Class

Attributes Class

The attributes of an Element.
Inheritance Hierarchy
SystemObject
Supremes.NodesAttributes

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class Attributes : IEnumerable<Attribute>,
    IEnumerable
Public NotInheritable Class Attributes
    Implements IEnumerable(Of Attribute), IEnumerable
[<SealedAttribute>]
type Attributes =
    class
        interface IEnumerable<Attribute>
        interface IEnumerable
    end

The Attributes type exposes the following members.

Methods
 | Name | Description
Public method | AsList | Get the attributes as a List, for iteration.
Public method | ContainsKey | Tests if these attributes contain an attribute with this key.
Public method | Equals | Compares two Attributes instances for equality. (Overrides ObjectEquals(Object).)
Public method | GetEnumerator | Returns an enumerator that iterates through the Attributes.
Public method | GetHashCode | Returns the hash code for this instance. (Overrides ObjectGetHashCode.)
Public method | GetType | (Inherited from Object.)
Public method | Put | Set a new attribute, or replace an existing one by key.
Public method | Remove | Remove an attribute by key.
Public method | SetAll | Add all the attributes from the incoming set to this set.
Public method | ToString | Converts the value of this instance to a string. (Overrides ObjectToString.)
Top
Properties
 | Name | Description
Public property | Count | Get the number of attributes in this set.
Public property | Dataset | Retrieves a filtered view of attributes that are HTML5 custom data attributes; that is, attributes with keys starting with data- .
Public property | Html | Get the HTML representation of these attributes.
Public property | Item | Get an attribute value by key. Set a new attribute, or replace an existing one by key.
Top
Remarks
Attributes are treated as a map: there can be only one value associated with an attribute key.

Attribute key and value comparisons are done case insensitively, and keys are normalised to lower-case.

See Also

Reference


Attributes Methods

Attributes Methods

The Attributes type exposes the following members.

Methods
 | Name | Description
Public method | AsList | Get the attributes as a List, for iteration.
Public method | ContainsKey | Tests if these attributes contain an attribute with this key.
Public method | Equals | Compares two Attributes instances for equality. (Overrides ObjectEquals(Object).)
Public method | GetEnumerator | Returns an enumerator that iterates through the Attributes.
Public method | GetHashCode | Returns the hash code for this instance. (Overrides ObjectGetHashCode.)
Public method | GetType | (Inherited from Object.)
Public method | Put | Set a new attribute, or replace an existing one by key.
Public method | Remove | Remove an attribute by key.
Public method | SetAll | Add all the attributes from the incoming set to this set.
Public method | ToString | Converts the value of this instance to a string. (Overrides ObjectToString.)
Top
See Also

Reference

Attributes Class


Attributes.AsList Method

AttributesAsList Method

Get the attributes as a List, for iteration.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IReadOnlyList<Attribute> AsList()
Public Function AsList As IReadOnlyList(Of Attribute)
member AsList : unit -> IReadOnlyList<Attribute>

Return Value

Type: IReadOnlyList Attribute
an view of the attributes as a List.
Remarks
Get the attributes as a List, for iteration. Do not modify the keys of the attributes via this view, as changes to keys will not be recognised in the containing set.
See Also

Reference

Attributes Class


Attributes.ContainsKey Method

AttributesContainsKey Method

Tests if these attributes contain an attribute with this key.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool ContainsKey(
    string key
)
Public Function ContainsKey (
    key As String
) As Boolean
member ContainsKey :
        key : string -> bool

Parameters

key
Type: SystemString
key to check for

Return Value

Type: Boolean
true if key exists, false otherwise
See Also

Reference

Attributes Class


Attributes.Equals Method

AttributesEquals Method

Compares two Attributes instances for equality.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override bool Equals(
    Object obj
)
Public Overrides Function Equals (
    obj As Object
) As Boolean
abstract Equals :
        obj : Object -> bool
override Equals :
        obj : Object -> bool

Parameters

obj
Type: SystemObject

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Supremes.Nodes.Attributes.Equals(System.Object)"]

See Also

Reference

Attributes Class


Attributes.GetEnumerator Method

AttributesGetEnumerator Method

Returns an enumerator that iterates through the Attributes.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IEnumerator<Attribute> GetEnumerator()
Public Function GetEnumerator As IEnumerator(Of Attribute)
abstract GetEnumerator : unit -> IEnumerator<Attribute>
override GetEnumerator : unit -> IEnumerator<Attribute>

Return Value

Type: IEnumerator Attribute

[Missing <returns> documentation for "M:Supremes.Nodes.Attributes.GetEnumerator"]

Implements

IEnumerableTGetEnumerator
See Also

Reference

Attributes Class


Attributes.GetHashCode Method

AttributesGetHashCode Method

Returns the hash code for this instance.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override int GetHashCode()
Public Overrides Function GetHashCode As Integer
abstract GetHashCode : unit -> int
override GetHashCode : unit -> int

Return Value

Type: Int32

[Missing <returns> documentation for "M:Supremes.Nodes.Attributes.GetHashCode"]

See Also

Reference

Attributes Class


Attributes.Put Method

AttributesPut Method

Set a new attribute, or replace an existing one by key.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public void Put(
    Attribute attribute
)
Public Sub Put (
    attribute As Attribute
)
member Put :
        attribute : Attribute -> unit

Parameters

attribute
Type: Supremes.NodesAttribute
attribute
See Also

Reference

Attributes Class


Attributes.Remove Method

AttributesRemove Method

Remove an attribute by key.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public void Remove(
    string key
)
Public Sub Remove (
    key As String
)
member Remove :
        key : string -> unit

Parameters

key
Type: SystemString
attribute key to remove
See Also

Reference

Attributes Class


Attributes.SetAll Method

AttributesSetAll Method

Add all the attributes from the incoming set to this set.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public void SetAll(
    Attributes incoming
)
Public Sub SetAll (
    incoming As Attributes
)
member SetAll :
        incoming : Attributes -> unit

Parameters

incoming
Type: Supremes.NodesAttributes
attributes to add to these attributes.
See Also

Reference

Attributes Class


Attributes.ToString Method

AttributesToString Method

Converts the value of this instance to a string.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string ToString()
Public Overrides Function ToString As String
abstract ToString : unit -> string
override ToString : unit -> string

Return Value

Type: String

[Missing <returns> documentation for "M:Supremes.Nodes.Attributes.ToString"]

See Also

Reference

Attributes Class


Attributes Properties

Attributes Properties

The Attributes type exposes the following members.

Properties
 | Name | Description
Public property | Count | Get the number of attributes in this set.
Public property | Dataset | Retrieves a filtered view of attributes that are HTML5 custom data attributes; that is, attributes with keys starting with data- .
Public property | Html | Get the HTML representation of these attributes.
Public property | Item | Get an attribute value by key. Set a new attribute, or replace an existing one by key.
Top
See Also

Reference

Attributes Class


Attributes.Count Property

AttributesCount Property

Get the number of attributes in this set.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public int Count { get; }
Public ReadOnly Property Count As Integer
    Get
member Count : int with get

Return Value

Type: Int32
size
See Also

Reference

Attributes Class


Attributes.Dataset Property

AttributesDataset Property

Retrieves a filtered view of attributes that are HTML5 custom data attributes; that is, attributes with keys starting with data- .

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IDictionary<string, string> Dataset { get; }
Public ReadOnly Property Dataset As IDictionary(Of String, String)
    Get
member Dataset : IDictionary<string, string> with get

Return Value

Type: IDictionary String, String
map of custom data attributes.
See Also

Reference

Attributes Class


Attributes.Html Property

AttributesHtml Property

Get the HTML representation of these attributes.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Html { get; }
Public ReadOnly Property Html As String
    Get
member Html : string with get

Return Value

Type: String
HTML
See Also

Reference

Attributes Class


Attributes.Item Property

AttributesItem Property

Get an attribute value by key. Set a new attribute, or replace an existing one by key.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string this[
    string key
] { get; set; }
Public Default Property Item (
    key As String
) As String
    Get
    Set
member Item : string with get, set

Parameters

key
Type: SystemString
the attribute key

Property Value

Type: String
attribute value

Return Value

Type: String
the attribute value if set; or empty string if not set.
See Also

Reference

Attributes Class
Supremes.Nodes Namespace
ContainsKey(string)


Comment Class

Comment Class

A comment node.
Inheritance Hierarchy
SystemObject
Supremes.NodesNode
Supremes.NodesComment

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class Comment : Node
Public NotInheritable Class Comment
    Inherits Node
[<SealedAttribute>]
type Comment =
    class
        inherit Node
    end

The Comment type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>). (Inherited from Node.)
Public method | After(String) | Insert the specified HTML into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | After(Node) | Insert the specified node into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | Attr(String) | Get an attribute's value by its key. (Inherited from Node.)
Public method | Attr(String, String) | Set an attribute (key=value). (Inherited from Node.)
Public method | Before(String) | Insert the specified HTML into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | Before(Node) | Insert the specified node into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | Equals | Compares two Node instances for equality. (Inherited from Node.)
Public method | GetHashCode | Returns the hash code for this instance. (Inherited from Node.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Inherited from Node.)
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Inherited from Node.)
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | ToString | Converts the value of this instance to a string. (Overrides NodeToString.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this node. (Inherited from Node.)
Top
Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Inherited from Node.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | Data | Get the contents of the comment.
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this node. (Inherited from Node.)
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | Parent | Gets this node's parent node. (Inherited from Node.)
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Top
See Also

Reference


Comment Methods

Comment Methods

The Comment type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>). (Inherited from Node.)
Public method | After(String) | Insert the specified HTML into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | After(Node) | Insert the specified node into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | Attr(String) | Get an attribute's value by its key. (Inherited from Node.)
Public method | Attr(String, String) | Set an attribute (key=value). (Inherited from Node.)
Public method | Before(String) | Insert the specified HTML into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | Before(Node) | Insert the specified node into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | Equals | Compares two Node instances for equality. (Inherited from Node.)
Public method | GetHashCode | Returns the hash code for this instance. (Inherited from Node.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Inherited from Node.)
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Inherited from Node.)
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | ToString | Converts the value of this instance to a string. (Overrides NodeToString.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this node. (Inherited from Node.)
Top
See Also

Reference

Comment Class


Comment.ToString Method

CommentToString Method

Converts the value of this instance to a string.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string ToString()
Public Overrides Function ToString As String
abstract ToString : unit -> string
override ToString : unit -> string

Return Value

Type: String

[Missing <returns> documentation for "M:Supremes.Nodes.Comment.ToString"]

See Also

Reference

Comment Class


Comment Properties

Comment Properties

The Comment type exposes the following members.

Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Inherited from Node.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | Data | Get the contents of the comment.
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this node. (Inherited from Node.)
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | Parent | Gets this node's parent node. (Inherited from Node.)
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Top
See Also

Reference

Comment Class


Comment.Data Property

CommentData Property

Get the contents of the comment.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Data { get; }
Public ReadOnly Property Data As String
    Get
member Data : string with get

Return Value

Type: String
comment content
See Also

Reference

Comment Class


DataNode Class

DataNode Class

A data node, for contents of style, script tags etc, where contents should not show in text().
Inheritance Hierarchy
SystemObject
Supremes.NodesNode
Supremes.NodesDataNode

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class DataNode : Node
Public NotInheritable Class DataNode
    Inherits Node
[<SealedAttribute>]
type DataNode =
    class
        inherit Node
    end

The DataNode type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>). (Inherited from Node.)
Public method | After(String) | Insert the specified HTML into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | After(Node) | Insert the specified node into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | Attr(String) | Get an attribute's value by its key. (Inherited from Node.)
Public method | Attr(String, String) | Set an attribute (key=value). (Inherited from Node.)
Public method | Before(String) | Insert the specified HTML into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | Before(Node) | Insert the specified node into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | Equals | Compares two Node instances for equality. (Inherited from Node.)
Public method | GetHashCode | Returns the hash code for this instance. (Inherited from Node.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Inherited from Node.)
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Inherited from Node.)
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | ToString | Converts the value of this instance to a string. (Overrides NodeToString.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this node. (Inherited from Node.)
Top
Extension Methods
 | Name | Description
Public Extension Method | WholeData | Set the data contents of the specified node, and returns the node itself. (Defined by FluentUtility.)
Top
Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Inherited from Node.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this node. (Inherited from Node.)
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | Parent | Gets this node's parent node. (Inherited from Node.)
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Public property | WholeData | Get or Set the data contents of this node.
Top
See Also

Reference


DataNode Methods

DataNode Methods

The DataNode type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>). (Inherited from Node.)
Public method | After(String) | Insert the specified HTML into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | After(Node) | Insert the specified node into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | Attr(String) | Get an attribute's value by its key. (Inherited from Node.)
Public method | Attr(String, String) | Set an attribute (key=value). (Inherited from Node.)
Public method | Before(String) | Insert the specified HTML into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | Before(Node) | Insert the specified node into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | Equals | Compares two Node instances for equality. (Inherited from Node.)
Public method | GetHashCode | Returns the hash code for this instance. (Inherited from Node.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Inherited from Node.)
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Inherited from Node.)
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | ToString | Converts the value of this instance to a string. (Overrides NodeToString.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this node. (Inherited from Node.)
Top
Extension Methods
 | Name | Description
Public Extension Method | WholeData | Set the data contents of the specified node, and returns the node itself. (Defined by FluentUtility.)
Top
See Also

Reference

DataNode Class


DataNode.ToString Method

DataNodeToString Method

Converts the value of this instance to a string.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string ToString()
Public Overrides Function ToString As String
abstract ToString : unit -> string
override ToString : unit -> string

Return Value

Type: String

[Missing <returns> documentation for "M:Supremes.Nodes.DataNode.ToString"]

See Also

Reference

DataNode Class


DataNode Properties

DataNode Properties

The DataNode type exposes the following members.

Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Inherited from Node.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this node. (Inherited from Node.)
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | Parent | Gets this node's parent node. (Inherited from Node.)
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Public property | WholeData | Get or Set the data contents of this node.
Top
See Also

Reference

DataNode Class


DataNode.WholeData Property

DataNodeWholeData Property

Get or Set the data contents of this node.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string WholeData { get; set; }
Public Property WholeData As String
    Get
    Set
member WholeData : string with get, set

Property Value

Type: String
unencoded data

Return Value

Type: String
data will be unescaped and with original new lines, space etc.
Remarks
if you want to use fluent API, write using Supremes.Fluent;.
See Also

Reference

DataNode Class
Supremes.Fluent.FluentUtility


Document Class

Document Class

A HTML Document.
Inheritance Hierarchy
SystemObject
Supremes.NodesNode
Supremes.NodesElement
Supremes.NodesDocument

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class Document : Element
Public NotInheritable Class Document
    Inherits Element
[<SealedAttribute>]
type Document =
    class
        inherit Element
    end

The Document type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>). (Inherited from Node.)
Public method | AddClass | Add a class name to this element's class attribute. (Inherited from Element.)
Public method | After(String) | Insert the specified HTML into the DOM after this element (as a following sibling). (Inherited from Element.)
Public method | After(Node) | Insert the specified node into the DOM after this node (as a following sibling). (Inherited from Element.)
Public method | Append | Add inner HTML to this element. (Inherited from Element.)
Public method | AppendChild | Add a node child node to this element. (Inherited from Element.)
Public method | AppendElement | Create a new element by tag name, and add it as the last child. (Inherited from Element.)
Public method | AppendText | Create and append a new TextNode to this element. (Inherited from Element.)
Public method | Attr(String) | Get an attribute's value by its key. (Inherited from Node.)
Public method | Attr(String, String) | Set an attribute (key=value). (Inherited from Node.)
Public method | Before(String) | Insert the specified HTML into the DOM before this element (as a preceding sibling). (Inherited from Element.)
Public method | Before(Node) | Insert the specified node into the DOM before this node (as a preceding sibling). (Inherited from Element.)
Public method | Child | Get a child element of this element, by its 0-based index number. (Inherited from Element.)
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | CreateElement | Create a new Element, with this document's base uri.
 | CreateShell | Create a valid, empty shell of a document, suitable for adding more elements to.
Public method | Empty | Remove all of the element's child nodes. (Inherited from Element.)
Public method | Equals | Compares two Element instances for equality. (Inherited from Element.)
Public method | GetAllElements | Find all elements under this element (including self, and children of children). (Inherited from Element.)
Public method | GetElementById | Find an element by ID, including or under this element. (Inherited from Element.)
Public method | GetElementsByAttribute | Find elements that have a named attribute set. (Inherited from Element.)
Public method | GetElementsByAttributeStarting | Find elements that have an attribute name starting with the supplied prefix. (Inherited from Element.)
Public method | GetElementsByAttributeValue | Find elements that have an attribute with the specific value. (Inherited from Element.)
Public method | GetElementsByAttributeValueContaining | Find elements that have attributes whose value contains the match string. (Inherited from Element.)
Public method | GetElementsByAttributeValueEnding | Find elements that have attributes that end with the value suffix. (Inherited from Element.)
Public method | GetElementsByAttributeValueMatching(String, String) | Find elements that have attributes whose values match the supplied regular expression. (Inherited from Element.)
Public method | GetElementsByAttributeValueMatching(String, Regex) | Find elements that have attributes whose values match the supplied regular expression. (Inherited from Element.)
Public method | GetElementsByAttributeValueNot | Find elements that either do not have this attribute, or have it with a different value. (Inherited from Element.)
Public method | GetElementsByAttributeValueStarting | Find elements that have attributes that start with the value prefix. (Inherited from Element.)
Public method | GetElementsByClass | Find elements that have this class, including or under this element. (Inherited from Element.)
Public method | GetElementsByIndexEquals | Find elements whose sibling index is equal to the supplied index. (Inherited from Element.)
Public method | GetElementsByIndexGreaterThan | Find elements whose sibling index is greater than the supplied index. (Inherited from Element.)
Public method | GetElementsByIndexLessThan | Find elements whose sibling index is less than the supplied index. (Inherited from Element.)
Public method | GetElementsByTag | Finds elements, including and recursively under this element, with the specified tag name. (Inherited from Element.)
Public method | GetElementsContainingOwnText | Find elements that directly contain the specified string. (Inherited from Element.)
Public method | GetElementsContainingText | Find elements that contain the specified string. (Inherited from Element.)
Public method | GetElementsMatchingOwnText(String) | Find elements whose text matches the supplied regular expression. (Inherited from Element.)
Public method | GetElementsMatchingOwnText(Regex) | Find elements whose own text matches the supplied regular expression. (Inherited from Element.)
Public method | GetElementsMatchingText(String) | Find elements whose text matches the supplied regular expression. (Inherited from Element.)
Public method | GetElementsMatchingText(Regex) | Find elements whose text matches the supplied regular expression. (Inherited from Element.)
Public method | GetHashCode | Returns the hash code for this instance. (Inherited from Element.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Inherited from Node.)
Public method | HasClass | Tests if this element has a class. (Inherited from Element.)
Public method | InsertChildren | Inserts the given child nodes into this element at the specified index. (Inherited from Element.)
Public method | Prepend | Add inner HTML into this element. (Inherited from Element.)
Public method | PrependChild | Add a node to the start of this element's children. (Inherited from Element.)
Public method | PrependElement | Create a new element by tag name, and add it as the first child. (Inherited from Element.)
Public method | PrependText | Create and prepend a new TextNode to this element. (Inherited from Element.)
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Inherited from Node.)
Public method | RemoveClass | Remove a class name from this element's class attribute. (Inherited from Element.)
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | Select | Find elements that match the Supremes.Select.Selector CSS query, with this element as the starting context. Matched elements may include this element, or any of its children. (Inherited from Element.)
Public method | ToggleClass | Toggle a class name on this element's class attribute: if present, remove it; otherwise add it. (Inherited from Element.)
Public method | ToString | Converts the value of this instance to a string. (Inherited from Element.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this element. (Inherited from Element.)
Top
Extension Methods
 | Name | Description
Public Extension Method | ClassNames | Set all of the specified element's class names, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | Html | Set the specified element's inner HTML, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | OutputSettings | Set the specified document's current output settings, and returns the document itself. (Defined by FluentUtility.)
Public Extension Method | QuirksMode | Set the specified document's quirks mode, and returns the document itself. (Defined by FluentUtility.)
Public Extension Method | TagName | Set the name of the tag for the specified element, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | Text | Set the combined text of the specified document and all its children, and returns the document itself. (Defined by FluentUtility.)
Public Extension Method | Val | Set the value of the specified form element (input, textarea, etc), and returns the element itself. (Defined by FluentUtility.)
Top
Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Inherited from Node.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | Body | Accessor to the document's body element.
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | Children | Get this element's child elements. (Inherited from Element.)
Public property | ClassName | Gets the literal value of this element's "class" attribute, which may include multiple class names, space separated. (Inherited from Element.)
Public property | ClassNames | Get or Set all of the element's class names. (Inherited from Element.)
Public property | CssSelector | Get a CSS selector that will uniquely select this element. (Inherited from Element.)
Public property | Data | Get the combined data of this element. (Inherited from Element.)
Public property | DataNodes | Get this element's child data nodes. (Inherited from Element.)
Public property | Dataset | Get this element's HTML5 custom data attributes. (Inherited from Element.)
Public property | ElementSiblingIndex | Get the list index of this element in its element sibling list. (Inherited from Element.)
Public property | FirstElementSibling | Gets the first element sibling of this element. (Inherited from Element.)
Public property | HasText | Test if this element has any text content (that is not just whitespace). (Inherited from Element.)
Public property | Head | Accessor to the document's head element.
Public property | Html | Get Or Set the element's inner HTML. (Inherited from Element.)
Public property | Id | Get the id attribute of this element. (Inherited from Element.)
Public property | IsBlock | Test if this element is a block-level element. (Inherited from Element.)
Public property | LastElementSibling | Gets the last element sibling of this element (Inherited from Element.)
Public property | Location | Get the URL this Document was parsed from.
Public property | NextElementSibling | Gets the next sibling element of this element. (Inherited from Element.)
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this document. (Overrides NodeOuterHtml.)
Public property | OutputSettings | Get or Set the document's current output settings.
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | OwnText | Gets the text owned by this element only; does not get the combined text of all children. (Inherited from Element.)
Public property | Parent | Gets this element's parent element. (Inherited from Element.)
Public property | Parents | Get this element's parent and ancestors, up to the document root. (Inherited from Element.)
Public property | PreviousElementSibling | Gets the previous element sibling of this element. (Inherited from Element.)
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | QuirksMode | Get or Set the document's quirks mode.
Public property | SiblingElements | Get sibling elements. (Inherited from Element.)
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Public property | Tag | Get the Tag for this element. (Inherited from Element.)
Public property | TagName | Get or Set the name of the tag for this element. (Inherited from Element.)
Public property | Text | Get or Set the combined text of this element and all its children. (Overrides ElementText.)
Public property | TextNodes | Get this element's child text nodes. (Inherited from Element.)
Public property | Title | Get or Set the string contents of the document's title element.
Public property | Val | Get or Set the value of a form element (input, textarea, etc). (Inherited from Element.)
Top
See Also

Reference


Document Methods

Document Methods

The Document type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>). (Inherited from Node.)
Public method | AddClass | Add a class name to this element's class attribute. (Inherited from Element.)
Public method | After(String) | Insert the specified HTML into the DOM after this element (as a following sibling). (Inherited from Element.)
Public method | After(Node) | Insert the specified node into the DOM after this node (as a following sibling). (Inherited from Element.)
Public method | Append | Add inner HTML to this element. (Inherited from Element.)
Public method | AppendChild | Add a node child node to this element. (Inherited from Element.)
Public method | AppendElement | Create a new element by tag name, and add it as the last child. (Inherited from Element.)
Public method | AppendText | Create and append a new TextNode to this element. (Inherited from Element.)
Public method | Attr(String) | Get an attribute's value by its key. (Inherited from Node.)
Public method | Attr(String, String) | Set an attribute (key=value). (Inherited from Node.)
Public method | Before(String) | Insert the specified HTML into the DOM before this element (as a preceding sibling). (Inherited from Element.)
Public method | Before(Node) | Insert the specified node into the DOM before this node (as a preceding sibling). (Inherited from Element.)
Public method | Child | Get a child element of this element, by its 0-based index number. (Inherited from Element.)
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | CreateElement | Create a new Element, with this document's base uri.
 | CreateShell | Create a valid, empty shell of a document, suitable for adding more elements to.
Public method | Empty | Remove all of the element's child nodes. (Inherited from Element.)
Public method | Equals | Compares two Element instances for equality. (Inherited from Element.)
Public method | GetAllElements | Find all elements under this element (including self, and children of children). (Inherited from Element.)
Public method | GetElementById | Find an element by ID, including or under this element. (Inherited from Element.)
Public method | GetElementsByAttribute | Find elements that have a named attribute set. (Inherited from Element.)
Public method | GetElementsByAttributeStarting | Find elements that have an attribute name starting with the supplied prefix. (Inherited from Element.)
Public method | GetElementsByAttributeValue | Find elements that have an attribute with the specific value. (Inherited from Element.)
Public method | GetElementsByAttributeValueContaining | Find elements that have attributes whose value contains the match string. (Inherited from Element.)
Public method | GetElementsByAttributeValueEnding | Find elements that have attributes that end with the value suffix. (Inherited from Element.)
Public method | GetElementsByAttributeValueMatching(String, String) | Find elements that have attributes whose values match the supplied regular expression. (Inherited from Element.)
Public method | GetElementsByAttributeValueMatching(String, Regex) | Find elements that have attributes whose values match the supplied regular expression. (Inherited from Element.)
Public method | GetElementsByAttributeValueNot | Find elements that either do not have this attribute, or have it with a different value. (Inherited from Element.)
Public method | GetElementsByAttributeValueStarting | Find elements that have attributes that start with the value prefix. (Inherited from Element.)
Public method | GetElementsByClass | Find elements that have this class, including or under this element. (Inherited from Element.)
Public method | GetElementsByIndexEquals | Find elements whose sibling index is equal to the supplied index. (Inherited from Element.)
Public method | GetElementsByIndexGreaterThan | Find elements whose sibling index is greater than the supplied index. (Inherited from Element.)
Public method | GetElementsByIndexLessThan | Find elements whose sibling index is less than the supplied index. (Inherited from Element.)
Public method | GetElementsByTag | Finds elements, including and recursively under this element, with the specified tag name. (Inherited from Element.)
Public method | GetElementsContainingOwnText | Find elements that directly contain the specified string. (Inherited from Element.)
Public method | GetElementsContainingText | Find elements that contain the specified string. (Inherited from Element.)
Public method | GetElementsMatchingOwnText(String) | Find elements whose text matches the supplied regular expression. (Inherited from Element.)
Public method | GetElementsMatchingOwnText(Regex) | Find elements whose own text matches the supplied regular expression. (Inherited from Element.)
Public method | GetElementsMatchingText(String) | Find elements whose text matches the supplied regular expression. (Inherited from Element.)
Public method | GetElementsMatchingText(Regex) | Find elements whose text matches the supplied regular expression. (Inherited from Element.)
Public method | GetHashCode | Returns the hash code for this instance. (Inherited from Element.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Inherited from Node.)
Public method | HasClass | Tests if this element has a class. (Inherited from Element.)
Public method | InsertChildren | Inserts the given child nodes into this element at the specified index. (Inherited from Element.)
Public method | Prepend | Add inner HTML into this element. (Inherited from Element.)
Public method | PrependChild | Add a node to the start of this element's children. (Inherited from Element.)
Public method | PrependElement | Create a new element by tag name, and add it as the first child. (Inherited from Element.)
Public method | PrependText | Create and prepend a new TextNode to this element. (Inherited from Element.)
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Inherited from Node.)
Public method | RemoveClass | Remove a class name from this element's class attribute. (Inherited from Element.)
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | Select | Find elements that match the Supremes.Select.Selector CSS query, with this element as the starting context. Matched elements may include this element, or any of its children. (Inherited from Element.)
Public method | ToggleClass | Toggle a class name on this element's class attribute: if present, remove it; otherwise add it. (Inherited from Element.)
Public method | ToString | Converts the value of this instance to a string. (Inherited from Element.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this element. (Inherited from Element.)
Top
Extension Methods
 | Name | Description
Public Extension Method | ClassNames | Set all of the specified element's class names, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | Html | Set the specified element's inner HTML, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | OutputSettings | Set the specified document's current output settings, and returns the document itself. (Defined by FluentUtility.)
Public Extension Method | QuirksMode | Set the specified document's quirks mode, and returns the document itself. (Defined by FluentUtility.)
Public Extension Method | TagName | Set the name of the tag for the specified element, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | Text | Set the combined text of the specified document and all its children, and returns the document itself. (Defined by FluentUtility.)
Public Extension Method | Val | Set the value of the specified form element (input, textarea, etc), and returns the element itself. (Defined by FluentUtility.)
Top
See Also

Reference

Document Class


Document.CreateElement Method

DocumentCreateElement Method

Create a new Element, with this document's base uri.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element CreateElement(
    string tagName
)
Public Function CreateElement (
    tagName As String
) As Element
member CreateElement :
        tagName : string -> Element

Parameters

tagName
Type: SystemString
element tag name (e.g. a )

Return Value

Type: Element
new element
Remarks
Does not make the new element a child of this document.
See Also

Reference

Document Class


Document.CreateShell Method

DocumentCreateShell Method

Create a valid, empty shell of a document, suitable for adding more elements to.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document CreateShell(
    string baseUri
)
Public Shared Function CreateShell (
    baseUri As String
) As Document
static member CreateShell :
        baseUri : string -> Document

Parameters

baseUri
Type: SystemString
baseUri of document

Return Value

Type: Document
document with html, head, and body elements.
See Also

Reference

Document Class


Document Properties

Document Properties

The Document type exposes the following members.

Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Inherited from Node.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | Body | Accessor to the document's body element.
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | Children | Get this element's child elements. (Inherited from Element.)
Public property | ClassName | Gets the literal value of this element's "class" attribute, which may include multiple class names, space separated. (Inherited from Element.)
Public property | ClassNames | Get or Set all of the element's class names. (Inherited from Element.)
Public property | CssSelector | Get a CSS selector that will uniquely select this element. (Inherited from Element.)
Public property | Data | Get the combined data of this element. (Inherited from Element.)
Public property | DataNodes | Get this element's child data nodes. (Inherited from Element.)
Public property | Dataset | Get this element's HTML5 custom data attributes. (Inherited from Element.)
Public property | ElementSiblingIndex | Get the list index of this element in its element sibling list. (Inherited from Element.)
Public property | FirstElementSibling | Gets the first element sibling of this element. (Inherited from Element.)
Public property | HasText | Test if this element has any text content (that is not just whitespace). (Inherited from Element.)
Public property | Head | Accessor to the document's head element.
Public property | Html | Get Or Set the element's inner HTML. (Inherited from Element.)
Public property | Id | Get the id attribute of this element. (Inherited from Element.)
Public property | IsBlock | Test if this element is a block-level element. (Inherited from Element.)
Public property | LastElementSibling | Gets the last element sibling of this element (Inherited from Element.)
Public property | Location | Get the URL this Document was parsed from.
Public property | NextElementSibling | Gets the next sibling element of this element. (Inherited from Element.)
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this document. (Overrides NodeOuterHtml.)
Public property | OutputSettings | Get or Set the document's current output settings.
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | OwnText | Gets the text owned by this element only; does not get the combined text of all children. (Inherited from Element.)
Public property | Parent | Gets this element's parent element. (Inherited from Element.)
Public property | Parents | Get this element's parent and ancestors, up to the document root. (Inherited from Element.)
Public property | PreviousElementSibling | Gets the previous element sibling of this element. (Inherited from Element.)
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | QuirksMode | Get or Set the document's quirks mode.
Public property | SiblingElements | Get sibling elements. (Inherited from Element.)
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Public property | Tag | Get the Tag for this element. (Inherited from Element.)
Public property | TagName | Get or Set the name of the tag for this element. (Inherited from Element.)
Public property | Text | Get or Set the combined text of this element and all its children. (Overrides ElementText.)
Public property | TextNodes | Get this element's child text nodes. (Inherited from Element.)
Public property | Title | Get or Set the string contents of the document's title element.
Public property | Val | Get or Set the value of a form element (input, textarea, etc). (Inherited from Element.)
Top
See Also

Reference

Document Class


Document.Body Property

DocumentBody Property

Accessor to the document's body element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element Body { get; }
Public ReadOnly Property Body As Element
    Get
member Body : Element with get

Return Value

Type: Element
body
See Also

Reference

Document Class


Document.Head Property

DocumentHead Property

Accessor to the document's head element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element Head { get; }
Public ReadOnly Property Head As Element
    Get
member Head : Element with get

Return Value

Type: Element
head
See Also

Reference

Document Class


Document.Location Property

DocumentLocation Property

Get the URL this Document was parsed from.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Location { get; }
Public ReadOnly Property Location As String
    Get
member Location : string with get

Return Value

Type: String
location
Remarks
If the starting URL is a redirect, this will return the final URL from which the document was served from.
See Also

Reference

Document Class


Document.OuterHtml Property

DocumentOuterHtml Property

Get the outer HTML of this document.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override sealed string OuterHtml { get; }
Public Overrides NotOverridable ReadOnly Property OuterHtml As String
    Get
abstract OuterHtml : string with get
override OuterHtml : string with get

Return Value

Type: String
See Also

Reference

Document Class


Document.OutputSettings Property

DocumentOutputSettings Property

Get or Set the document's current output settings.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public DocumentOutputSettings OutputSettings { get; set; }
Public Property OutputSettings As DocumentOutputSettings
    Get
    Set
member OutputSettings : DocumentOutputSettings with get, set

Property Value

Type: DocumentOutputSettings
new output settings

Return Value

Type: DocumentOutputSettings
the document's current output settings
Remarks
if you want to use fluent API, write using Supremes.Fluent;.
See Also

Reference

Document Class
Supremes.Fluent.FluentUtility


Document.QuirksMode Property

DocumentQuirksMode Property

Get or Set the document's quirks mode.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public DocumentQuirksMode QuirksMode { get; set; }
Public Property QuirksMode As DocumentQuirksMode
    Get
    Set
member QuirksMode : DocumentQuirksMode with get, set

Property Value

Type: DocumentQuirksMode
Remarks
if you want to use fluent API, write using Supremes.Fluent;.
See Also

Reference

Document Class
Supremes.Fluent.FluentUtility


Document.Text Property

DocumentText Property

Get or Set the combined text of this element and all its children.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string Text { get; set; }
Public Overrides Property Text As String
    Get
    Set
abstract Text : string with get, set
override Text : string with get, set

Property Value

Type: String
unencoded text

Return Value

Type: String
unencoded text, or empty string if none.
Remarks

when get, whitespace is normalized and trimmed.

For example, given HTML <p>Hello <b>there</b> now! </p>, p.Text returns "Hello there now!"

when set, any existing contents (text or elements) will be cleared.

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

Document Class
Supremes.Fluent.FluentUtility


Document.Title Property

DocumentTitle Property

Get or Set the string contents of the document's title element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Title { get; set; }
Public Property Title As String
    Get
    Set
member Title : string with get, set

Property Value

Type: String
string to set as title

Return Value

Type: String
Trimmed title, or empty string if none set.
Remarks
when set, updates the existing element, or adds title to head if not present
See Also

Reference

Document Class


DocumentEscapeMode Enumeration

DocumentEscapeMode Enumeration

Specifies the document's current HTML escape mode.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public enum DocumentEscapeMode
Public Enumeration DocumentEscapeMode
type DocumentEscapeMode
Members
Member name | Value | Description
Xhtml | 0 | Restricted entities suitable for XHTML output: lt, gt, amp, and quot only.
Base | 1 | Default HTML output entities.
Extended | 2 | Complete HTML entities.
See Also

Reference


DocumentOutputSettings Class

DocumentOutputSettings Class

A Document's output settings control the form of the text() and html() methods.
Inheritance Hierarchy
SystemObject
Supremes.NodesDocumentOutputSettings

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class DocumentOutputSettings
Public NotInheritable Class DocumentOutputSettings
[<SealedAttribute>]
type DocumentOutputSettings =  class end

The DocumentOutputSettings type exposes the following members.

Methods
 | Name | Description
Public method | Equals | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Public method | ToString | (Inherited from Object.)
Top
Extension Methods
 | Name | Description
Public Extension Method | Charset(Encoding) | Overloaded. Set the current output charset of the specified document settings, and returns the document settings itself. (Defined by FluentUtility.)
Public Extension Method | Charset(String) | Overloaded. Set the current output charset of the specified document settings, and returns the document settings itself. (Defined by FluentUtility.)
Public Extension Method | EscapeMode | Set the current HTML escape mode of the specified document settings, and returns the document settings itself. (Defined by FluentUtility.)
Public Extension Method | IndentAmount | Set the current tag indent amount of the specified document settings, used when pretty printing, and returns the document settings itself. (Defined by FluentUtility.)
Public Extension Method | Outline | Set if outline mode is enabled to the specified document settings, and returns the document settings itself. (Defined by FluentUtility.)
Public Extension Method | PrettyPrint | Set if pretty printing is enabled to the specified document settings, and returns the document settings itself. (Defined by FluentUtility.)
Public Extension Method | Syntax | Set the current output syntax of the specified document settings, and returns the document settings itself. (Defined by FluentUtility.)
Top
Properties
 | Name | Description
Public property | Charset | Get or Set the document's current output charset, which is used to control which characters are escaped when generating HTML (via the Html properties), and which are kept intact.
Public property | EscapeMode | Get or Set the document's current HTML escape mode, which determines how characters are escaped when the output character set does not support a given character.
Public property | IndentAmount | Get or Set the current tag indent amount, used when pretty printing.
Public property | Outline | Get or Set if outline mode is enabled.
Public property | PrettyPrint | Get or Set if pretty printing is enabled.
Public property | Syntax | Get or Set the document's current output syntax.
Top
See Also

Reference


DocumentOutputSettings Methods

DocumentOutputSettings Methods

The DocumentOutputSettings type exposes the following members.

Methods
 | Name | Description
Public method | Equals | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Public method | ToString | (Inherited from Object.)
Top
Extension Methods
 | Name | Description
Public Extension Method | Charset(Encoding) | Overloaded. Set the current output charset of the specified document settings, and returns the document settings itself. (Defined by FluentUtility.)
Public Extension Method | Charset(String) | Overloaded. Set the current output charset of the specified document settings, and returns the document settings itself. (Defined by FluentUtility.)
Public Extension Method | EscapeMode | Set the current HTML escape mode of the specified document settings, and returns the document settings itself. (Defined by FluentUtility.)
Public Extension Method | IndentAmount | Set the current tag indent amount of the specified document settings, used when pretty printing, and returns the document settings itself. (Defined by FluentUtility.)
Public Extension Method | Outline | Set if outline mode is enabled to the specified document settings, and returns the document settings itself. (Defined by FluentUtility.)
Public Extension Method | PrettyPrint | Set if pretty printing is enabled to the specified document settings, and returns the document settings itself. (Defined by FluentUtility.)
Public Extension Method | Syntax | Set the current output syntax of the specified document settings, and returns the document settings itself. (Defined by FluentUtility.)
Top
See Also

Reference

DocumentOutputSettings Class


DocumentOutputSettings Properties

DocumentOutputSettings Properties

The DocumentOutputSettings type exposes the following members.

Properties
 | Name | Description
Public property | Charset | Get or Set the document's current output charset, which is used to control which characters are escaped when generating HTML (via the Html properties), and which are kept intact.
Public property | EscapeMode | Get or Set the document's current HTML escape mode, which determines how characters are escaped when the output character set does not support a given character.
Public property | IndentAmount | Get or Set the current tag indent amount, used when pretty printing.
Public property | Outline | Get or Set if outline mode is enabled.
Public property | PrettyPrint | Get or Set if pretty printing is enabled.
Public property | Syntax | Get or Set the document's current output syntax.
Top
See Also

Reference

DocumentOutputSettings Class


DocumentOutputSettings.Charset Property

DocumentOutputSettingsCharset Property

Get or Set the document's current output charset, which is used to control which characters are escaped when generating HTML (via the Html properties), and which are kept intact.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Encoding Charset { get; set; }
Public Property Charset As Encoding
    Get
    Set
member Charset : Encoding with get, set

Property Value

Type: Encoding
the new charset to use

Return Value

Type: Encoding
the document's current charset
Remarks

Where possible (when parsing from a URL or File), the document's output charset is automatically set to the input charset. Otherwise, it defaults to utf-8.

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

DocumentOutputSettings Class
Supremes.Fluent.FluentUtility


DocumentOutputSettings.EscapeMode Property

DocumentOutputSettingsEscapeMode Property

Get or Set the document's current HTML escape mode, which determines how characters are escaped when the output character set does not support a given character.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public DocumentEscapeMode EscapeMode { get; set; }
Public Property EscapeMode As DocumentEscapeMode
    Get
    Set
member EscapeMode : DocumentEscapeMode with get, set

Property Value

Type: DocumentEscapeMode
the new escape mode to use

Return Value

Type: DocumentEscapeMode
the document's current escape mode
Remarks

Base, which provides a limited set of named HTML entities and escapes other characters as numbered entities for maximum compatibility; or Extended, which uses the complete set of HTML named entities.

The default escape mode is Base.

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

DocumentOutputSettings Class
Supremes.Fluent.FluentUtility


DocumentOutputSettings.IndentAmount Property

DocumentOutputSettingsIndentAmount Property

Get or Set the current tag indent amount, used when pretty printing.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public int IndentAmount { get; set; }
Public Property IndentAmount As Integer
    Get
    Set
member IndentAmount : int with get, set

Property Value

Type: Int32
number of spaces to use for indenting each level. Must be >= 0

Return Value

Type: Int32
the current indent amount
See Also

Reference

DocumentOutputSettings Class
Supremes.Fluent.FluentUtility


DocumentOutputSettings.Outline Property

DocumentOutputSettingsOutline Property

Get or Set if outline mode is enabled.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool Outline { get; set; }
Public Property Outline As Boolean
    Get
    Set
member Outline : bool with get, set

Property Value

Type: Boolean
new outline setting

Return Value

Type: Boolean
true if outline mode is enabled
Remarks

Default is false. If enabled, the HTML output methods will consider all tags as block.

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

DocumentOutputSettings Class
Supremes.Fluent.FluentUtility


DocumentOutputSettings.PrettyPrint Property

DocumentOutputSettingsPrettyPrint Property

Get or Set if pretty printing is enabled.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool PrettyPrint { get; set; }
Public Property PrettyPrint As Boolean
    Get
    Set
member PrettyPrint : bool with get, set

Property Value

Type: Boolean
new pretty print setting

Return Value

Type: Boolean
if pretty printing is enabled.
Remarks

Default is true. If disabled, the HTML output methods will not re-format the output, and the output will generally look like the input.

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

DocumentOutputSettings Class
Supremes.Fluent.FluentUtility


DocumentOutputSettings.Syntax Property

DocumentOutputSettingsSyntax Property

Get or Set the document's current output syntax.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public DocumentSyntax Syntax { get; set; }
Public Property Syntax As DocumentSyntax
    Get
    Set
member Syntax : DocumentSyntax with get, set

Property Value

Type: DocumentSyntax
serialization syntax

Return Value

Type: DocumentSyntax
current syntax
Remarks

Either Html, with empty tags and boolean attributes (etc), or Xml, with self-closing tags.

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

DocumentOutputSettings Class
Supremes.Fluent.FluentUtility


DocumentQuirksMode Enumeration

DocumentQuirksMode Enumeration

Specifies how browsers should display an HTML file.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public enum DocumentQuirksMode
Public Enumeration DocumentQuirksMode
type DocumentQuirksMode
Members
Member name | Value | Description
NoQuirks | 0 | Follows Web standards.
Quirks | 1 | Emulate non-standard behavior of older browsers.
LimitedQuirks | 2 | Almost follows Web standards except few behaviors.
See Also

Reference


DocumentSyntax Enumeration

DocumentSyntax Enumeration

Specifies the output serialization syntax.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public enum DocumentSyntax
Public Enumeration DocumentSyntax
type DocumentSyntax
Members
Member name | Value | Description
Html | 0 | Serialize according to the HTML rules.
Xml | 1 | Serialize according to the XML rules.
See Also

Reference


Element Class

Element Class

A HTML element consists of a tag name, attributes, and child nodes (including text nodes and other elements).
Inheritance Hierarchy
SystemObject
Supremes.NodesNode
Supremes.NodesElement
Supremes.NodesDocument
Supremes.NodesFormElement

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public class Element : Node
Public Class Element
    Inherits Node
type Element =
    class
        inherit Node
    end

The Element type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>). (Inherited from Node.)
Public method | AddClass | Add a class name to this element's class attribute.
Public method | After(String) | Insert the specified HTML into the DOM after this element (as a following sibling). (Overrides NodeAfter(String).)
Public method | After(Node) | Insert the specified node into the DOM after this node (as a following sibling). (Overrides NodeAfter(Node).)
Public method | Append | Add inner HTML to this element.
Public method | AppendChild | Add a node child node to this element.
Public method | AppendElement | Create a new element by tag name, and add it as the last child.
Public method | AppendText | Create and append a new TextNode to this element.
Public method | Attr(String) | Get an attribute's value by its key. (Inherited from Node.)
Public method | Attr(String, String) | Set an attribute (key=value). (Inherited from Node.)
Public method | Before(String) | Insert the specified HTML into the DOM before this element (as a preceding sibling). (Overrides NodeBefore(String).)
Public method | Before(Node) | Insert the specified node into the DOM before this node (as a preceding sibling). (Overrides NodeBefore(Node).)
Public method | Child | Get a child element of this element, by its 0-based index number.
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | Empty | Remove all of the element's child nodes.
Public method | Equals | Compares two Element instances for equality. (Overrides NodeEquals(Object).)
Protected method | Finalize | (Inherited from Object.)
Public method | GetAllElements | Find all elements under this element (including self, and children of children).
Public method | GetElementById | Find an element by ID, including or under this element.
Public method | GetElementsByAttribute | Find elements that have a named attribute set.
Public method | GetElementsByAttributeStarting | Find elements that have an attribute name starting with the supplied prefix.
Public method | GetElementsByAttributeValue | Find elements that have an attribute with the specific value.
Public method | GetElementsByAttributeValueContaining | Find elements that have attributes whose value contains the match string.
Public method | GetElementsByAttributeValueEnding | Find elements that have attributes that end with the value suffix.
Public method | GetElementsByAttributeValueMatching(String, String) | Find elements that have attributes whose values match the supplied regular expression.
Public method | GetElementsByAttributeValueMatching(String, Regex) | Find elements that have attributes whose values match the supplied regular expression.
Public method | GetElementsByAttributeValueNot | Find elements that either do not have this attribute, or have it with a different value.
Public method | GetElementsByAttributeValueStarting | Find elements that have attributes that start with the value prefix.
Public method | GetElementsByClass | Find elements that have this class, including or under this element.
Public method | GetElementsByIndexEquals | Find elements whose sibling index is equal to the supplied index.
Public method | GetElementsByIndexGreaterThan | Find elements whose sibling index is greater than the supplied index.
Public method | GetElementsByIndexLessThan | Find elements whose sibling index is less than the supplied index.
Public method | GetElementsByTag | Finds elements, including and recursively under this element, with the specified tag name.
Public method | GetElementsContainingOwnText | Find elements that directly contain the specified string.
Public method | GetElementsContainingText | Find elements that contain the specified string.
Public method | GetElementsMatchingOwnText(String) | Find elements whose text matches the supplied regular expression.
Public method | GetElementsMatchingOwnText(Regex) | Find elements whose own text matches the supplied regular expression.
Public method | GetElementsMatchingText(String) | Find elements whose text matches the supplied regular expression.
Public method | GetElementsMatchingText(Regex) | Find elements whose text matches the supplied regular expression.
Public method | GetHashCode | Returns the hash code for this instance. (Overrides NodeGetHashCode.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Inherited from Node.)
Public method | HasClass | Tests if this element has a class.
Public method | InsertChildren | Inserts the given child nodes into this element at the specified index.
Protected method | MemberwiseClone | (Inherited from Object.)
Public method | Prepend | Add inner HTML into this element.
Public method | PrependChild | Add a node to the start of this element's children.
Public method | PrependElement | Create a new element by tag name, and add it as the first child.
Public method | PrependText | Create and prepend a new TextNode to this element.
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Inherited from Node.)
Public method | RemoveClass | Remove a class name from this element's class attribute.
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | Select | Find elements that match the Supremes.Select.Selector CSS query, with this element as the starting context. Matched elements may include this element, or any of its children.
Public method | ToggleClass | Toggle a class name on this element's class attribute: if present, remove it; otherwise add it.
Public method | ToString | Converts the value of this instance to a string. (Overrides NodeToString.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this element.
Top
Extension Methods
 | Name | Description
Public Extension Method | ClassNames | Set all of the specified element's class names, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | Html | Set the specified element's inner HTML, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | TagName | Set the name of the tag for the specified element, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | Val | Set the value of the specified form element (input, textarea, etc), and returns the element itself. (Defined by FluentUtility.)
Top
Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Inherited from Node.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | Children | Get this element's child elements.
Public property | ClassName | Gets the literal value of this element's "class" attribute, which may include multiple class names, space separated.
Public property | ClassNames | Get or Set all of the element's class names.
Public property | CssSelector | Get a CSS selector that will uniquely select this element.
Public property | Data | Get the combined data of this element.
Public property | DataNodes | Get this element's child data nodes.
Public property | Dataset | Get this element's HTML5 custom data attributes.
Public property | ElementSiblingIndex | Get the list index of this element in its element sibling list.
Public property | FirstElementSibling | Gets the first element sibling of this element.
Public property | HasText | Test if this element has any text content (that is not just whitespace).
Public property | Html | Get Or Set the element's inner HTML.
Public property | Id | Get the id attribute of this element.
Public property | IsBlock | Test if this element is a block-level element.
Public property | LastElementSibling | Gets the last element sibling of this element
Public property | NextElementSibling | Gets the next sibling element of this element.
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this node. (Inherited from Node.)
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | OwnText | Gets the text owned by this element only; does not get the combined text of all children.
Public property | Parent | Gets this element's parent element.
Public property | Parents | Get this element's parent and ancestors, up to the document root.
Public property | PreviousElementSibling | Gets the previous element sibling of this element.
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | SiblingElements | Get sibling elements.
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Public property | Tag | Get the Tag for this element.
Public property | TagName | Get or Set the name of the tag for this element.
Public property | Text | Get or Set the combined text of this element and all its children.
Public property | TextNodes | Get this element's child text nodes.
Public property | Val | Get or Set the value of a form element (input, textarea, etc).
Top
Remarks
From an Element, you can extract data, traverse the node graph, and manipulate the HTML.
See Also

Reference


Element Methods

Element Methods

The Element type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>). (Inherited from Node.)
Public method | AddClass | Add a class name to this element's class attribute.
Public method | After(String) | Insert the specified HTML into the DOM after this element (as a following sibling). (Overrides NodeAfter(String).)
Public method | After(Node) | Insert the specified node into the DOM after this node (as a following sibling). (Overrides NodeAfter(Node).)
Public method | Append | Add inner HTML to this element.
Public method | AppendChild | Add a node child node to this element.
Public method | AppendElement | Create a new element by tag name, and add it as the last child.
Public method | AppendText | Create and append a new TextNode to this element.
Public method | Attr(String) | Get an attribute's value by its key. (Inherited from Node.)
Public method | Attr(String, String) | Set an attribute (key=value). (Inherited from Node.)
Public method | Before(String) | Insert the specified HTML into the DOM before this element (as a preceding sibling). (Overrides NodeBefore(String).)
Public method | Before(Node) | Insert the specified node into the DOM before this node (as a preceding sibling). (Overrides NodeBefore(Node).)
Public method | Child | Get a child element of this element, by its 0-based index number.
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | Empty | Remove all of the element's child nodes.
Public method | Equals | Compares two Element instances for equality. (Overrides NodeEquals(Object).)
Protected method | Finalize | (Inherited from Object.)
Public method | GetAllElements | Find all elements under this element (including self, and children of children).
Public method | GetElementById | Find an element by ID, including or under this element.
Public method | GetElementsByAttribute | Find elements that have a named attribute set.
Public method | GetElementsByAttributeStarting | Find elements that have an attribute name starting with the supplied prefix.
Public method | GetElementsByAttributeValue | Find elements that have an attribute with the specific value.
Public method | GetElementsByAttributeValueContaining | Find elements that have attributes whose value contains the match string.
Public method | GetElementsByAttributeValueEnding | Find elements that have attributes that end with the value suffix.
Public method | GetElementsByAttributeValueMatching(String, String) | Find elements that have attributes whose values match the supplied regular expression.
Public method | GetElementsByAttributeValueMatching(String, Regex) | Find elements that have attributes whose values match the supplied regular expression.
Public method | GetElementsByAttributeValueNot | Find elements that either do not have this attribute, or have it with a different value.
Public method | GetElementsByAttributeValueStarting | Find elements that have attributes that start with the value prefix.
Public method | GetElementsByClass | Find elements that have this class, including or under this element.
Public method | GetElementsByIndexEquals | Find elements whose sibling index is equal to the supplied index.
Public method | GetElementsByIndexGreaterThan | Find elements whose sibling index is greater than the supplied index.
Public method | GetElementsByIndexLessThan | Find elements whose sibling index is less than the supplied index.
Public method | GetElementsByTag | Finds elements, including and recursively under this element, with the specified tag name.
Public method | GetElementsContainingOwnText | Find elements that directly contain the specified string.
Public method | GetElementsContainingText | Find elements that contain the specified string.
Public method | GetElementsMatchingOwnText(String) | Find elements whose text matches the supplied regular expression.
Public method | GetElementsMatchingOwnText(Regex) | Find elements whose own text matches the supplied regular expression.
Public method | GetElementsMatchingText(String) | Find elements whose text matches the supplied regular expression.
Public method | GetElementsMatchingText(Regex) | Find elements whose text matches the supplied regular expression.
Public method | GetHashCode | Returns the hash code for this instance. (Overrides NodeGetHashCode.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Inherited from Node.)
Public method | HasClass | Tests if this element has a class.
Public method | InsertChildren | Inserts the given child nodes into this element at the specified index.
Protected method | MemberwiseClone | (Inherited from Object.)
Public method | Prepend | Add inner HTML into this element.
Public method | PrependChild | Add a node to the start of this element's children.
Public method | PrependElement | Create a new element by tag name, and add it as the first child.
Public method | PrependText | Create and prepend a new TextNode to this element.
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Inherited from Node.)
Public method | RemoveClass | Remove a class name from this element's class attribute.
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | Select | Find elements that match the Supremes.Select.Selector CSS query, with this element as the starting context. Matched elements may include this element, or any of its children.
Public method | ToggleClass | Toggle a class name on this element's class attribute: if present, remove it; otherwise add it.
Public method | ToString | Converts the value of this instance to a string. (Overrides NodeToString.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this element.
Top
Extension Methods
 | Name | Description
Public Extension Method | ClassNames | Set all of the specified element's class names, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | Html | Set the specified element's inner HTML, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | TagName | Set the name of the tag for the specified element, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | Val | Set the value of the specified form element (input, textarea, etc), and returns the element itself. (Defined by FluentUtility.)
Top
See Also

Reference

Element Class


Element.AddClass Method

ElementAddClass Method

Add a class name to this element's class attribute.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element AddClass(
    string className
)
Public Function AddClass (
    className As String
) As Element
member AddClass :
        className : string -> Element

Parameters

className
Type: SystemString
class name to add

Return Value

Type: Element
this element
See Also

Reference

Element Class


Element.After Method

ElementAfter Method

Overload List
 | Name | Description
Public method | After(String) | Insert the specified HTML into the DOM after this element (as a following sibling). (Overrides NodeAfter(String).)
Public method | After(Node) | Insert the specified node into the DOM after this node (as a following sibling). (Overrides NodeAfter(Node).)
Top
See Also

Reference

Element Class


Element.After Method (String)

ElementAfter Method (String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Insert the specified HTML into the DOM after this element (as a following sibling).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override Node After(
    string html
)
Public Overrides Function After (
    html As String
) As Node
abstract After :
        html : string -> Node
override After :
        html : string -> Node

Parameters

html
Type: SystemString
HTML to add after this element

Return Value

Type: Node
this element, for chaining
See Also

Reference

Element Class
After Overload
Supremes.Nodes Namespace
Before(string)


Element.After Method (Node)

ElementAfter Method (Node)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Insert the specified node into the DOM after this node (as a following sibling).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override Node After(
    Node node
)
Public Overrides Function After (
    node As Node
) As Node
abstract After :
        node : Node -> Node
override After :
        node : Node -> Node

Parameters

node
Type: Supremes.NodesNode
to add after this element

Return Value

Type: Node
this element, for chaining
See Also

Reference

Element Class
After Overload
Supremes.Nodes Namespace
Before(Node)


Element.Append Method

ElementAppend Method

Add inner HTML to this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element Append(
    string html
)
Public Function Append (
    html As String
) As Element
member Append :
        html : string -> Element

Parameters

html
Type: SystemString
HTML to add inside this element, after the existing HTML

Return Value

Type: Element
this element
Remarks
The supplied HTML will be parsed, and each node appended to the end of the children.
See Also

Reference

Element Class
Html


Element.AppendChild Method

ElementAppendChild Method

Add a node child node to this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element AppendChild(
    Node child
)
Public Function AppendChild (
    child As Node
) As Element
member AppendChild :
        child : Node -> Element

Parameters

child
Type: Supremes.NodesNode
node to add.

Return Value

Type: Element
this element, so that you can add more child nodes or elements.
See Also

Reference

Element Class


Element.AppendElement Method

ElementAppendElement Method

Create a new element by tag name, and add it as the last child.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element AppendElement(
    string tagName
)
Public Function AppendElement (
    tagName As String
) As Element
member AppendElement :
        tagName : string -> Element

Parameters

tagName
Type: SystemString
the name of the tag (e.g. div ).

Return Value

Type: Element
the new element, to allow you to add content to it, e.g.: parent.AppendElement("h1").Attr("id", "header").Text("Welcome");
See Also

Reference

Element Class


Element.AppendText Method

ElementAppendText Method

Create and append a new TextNode to this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element AppendText(
    string text
)
Public Function AppendText (
    text As String
) As Element
member AppendText :
        text : string -> Element

Parameters

text
Type: SystemString
the unencoded text to add

Return Value

Type: Element
this element
See Also

Reference

Element Class


Element.Before Method

ElementBefore Method

Overload List
 | Name | Description
Public method | Before(String) | Insert the specified HTML into the DOM before this element (as a preceding sibling). (Overrides NodeBefore(String).)
Public method | Before(Node) | Insert the specified node into the DOM before this node (as a preceding sibling). (Overrides NodeBefore(Node).)
Top
See Also

Reference

Element Class


Element.Before Method (String)

ElementBefore Method (String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Insert the specified HTML into the DOM before this element (as a preceding sibling).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override Node Before(
    string html
)
Public Overrides Function Before (
    html As String
) As Node
abstract Before :
        html : string -> Node
override Before :
        html : string -> Node

Parameters

html
Type: SystemString
HTML to add before this element

Return Value

Type: Node
this element, for chaining
See Also

Reference

Element Class
Before Overload
Supremes.Nodes Namespace
After(string)


Element.Before Method (Node)

ElementBefore Method (Node)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Insert the specified node into the DOM before this node (as a preceding sibling).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override Node Before(
    Node node
)
Public Overrides Function Before (
    node As Node
) As Node
abstract Before :
        node : Node -> Node
override Before :
        node : Node -> Node

Parameters

node
Type: Supremes.NodesNode
to add before this element

Return Value

Type: Node
this Element, for chaining
See Also

Reference

Element Class
Before Overload
Supremes.Nodes Namespace
After(Node)


Element.Child Method

ElementChild Method

Get a child element of this element, by its 0-based index number.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element Child(
    int index
)
Public Function Child (
    index As Integer
) As Element
member Child :
        index : int -> Element

Parameters

index
Type: SystemInt32
the index number of the element to retrieve

Return Value

Type: Element
the child element, if it exists, otherwise throws an IndexOutOfBoundsException
Remarks
Note that an element can have both mixed Nodes and Elements as children. This method inspects a filtered list of children that are elements, and the index is based on that filtered list.
See Also

Reference

Element Class
Supremes.Nodes Namespace
Node.ChildNode(int)


Element.Empty Method

ElementEmpty Method

Remove all of the element's child nodes.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element Empty()
Public Function Empty As Element
member Empty : unit -> Element

Return Value

Type: Element
this element
Remarks
Any attributes are left as-is.
See Also

Reference

Element Class


Element.Equals Method

ElementEquals Method

Compares two Element instances for equality.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override bool Equals(
    Object o
)
Public Overrides Function Equals (
    o As Object
) As Boolean
abstract Equals :
        o : Object -> bool
override Equals :
        o : Object -> bool

Parameters

o
Type: SystemObject

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Supremes.Nodes.Element.Equals(System.Object)"]

See Also

Reference

Element Class


Element.GetAllElements Method

ElementGetAllElements Method

Find all elements under this element (including self, and children of children).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetAllElements()
Public Function GetAllElements As Elements
member GetAllElements : unit -> Elements

Return Value

Type: Elements
all elements
See Also

Reference

Element Class


Element.GetElementById Method

ElementGetElementById Method

Find an element by ID, including or under this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element GetElementById(
    string id
)
Public Function GetElementById (
    id As String
) As Element
member GetElementById :
        id : string -> Element

Parameters

id
Type: SystemString
The ID to search for.

Return Value

Type: Element
The first matching element by ID, starting with this element, or null if none found.
Remarks
Note that this finds the first matching ID, starting with this element. If you search down from a different starting point, it is possible to find a different element by ID. For unique element by ID within a Document, use Element.GetElementById(string)
See Also

Reference

Element Class


Element.GetElementsByAttribute Method

ElementGetElementsByAttribute Method

Find elements that have a named attribute set.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByAttribute(
    string key
)
Public Function GetElementsByAttribute (
    key As String
) As Elements
member GetElementsByAttribute :
        key : string -> Elements

Parameters

key
Type: SystemString
name of the attribute, e.g. href

Return Value

Type: Elements
elements that have this attribute, empty if none
Remarks
Case insensitive.
See Also

Reference

Element Class


Element.GetElementsByAttributeStarting Method

ElementGetElementsByAttributeStarting Method

Find elements that have an attribute name starting with the supplied prefix.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByAttributeStarting(
    string keyPrefix
)
Public Function GetElementsByAttributeStarting (
    keyPrefix As String
) As Elements
member GetElementsByAttributeStarting :
        keyPrefix : string -> Elements

Parameters

keyPrefix
Type: SystemString
name prefix of the attribute e.g. data-

Return Value

Type: Elements
elements that have attribute names that start with with the prefix, empty if none.
Remarks
Use data- to find elements that have HTML5 datasets.
See Also

Reference

Element Class


Element.GetElementsByAttributeValue Method

ElementGetElementsByAttributeValue Method

Find elements that have an attribute with the specific value.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByAttributeValue(
    string key,
    string value
)
Public Function GetElementsByAttributeValue (
    key As String,
    value As String
) As Elements
member GetElementsByAttributeValue :
        key : string *
        value : string -> Elements

Parameters

key
Type: SystemString
name of the attribute
value
Type: SystemString
value of the attribute

Return Value

Type: Elements
elements that have this attribute with this value, empty if none
Remarks
Case insensitive.
See Also

Reference

Element Class


Element.GetElementsByAttributeValueContaining Method

ElementGetElementsByAttributeValueContaining Method

Find elements that have attributes whose value contains the match string.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByAttributeValueContaining(
    string key,
    string match
)
Public Function GetElementsByAttributeValueContaining (
    key As String,
    match As String
) As Elements
member GetElementsByAttributeValueContaining :
        key : string *
        match : string -> Elements

Parameters

key
Type: SystemString
name of the attribute
match
Type: SystemString
substring of value to search for

Return Value

Type: Elements
elements that have attributes containing this text
Remarks
Case insensitive.
See Also

Reference

Element Class


Element.GetElementsByAttributeValueEnding Method

ElementGetElementsByAttributeValueEnding Method

Find elements that have attributes that end with the value suffix.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByAttributeValueEnding(
    string key,
    string valueSuffix
)
Public Function GetElementsByAttributeValueEnding (
    key As String,
    valueSuffix As String
) As Elements
member GetElementsByAttributeValueEnding :
        key : string *
        valueSuffix : string -> Elements

Parameters

key
Type: SystemString
name of the attribute
valueSuffix
Type: SystemString
end of the attribute value

Return Value

Type: Elements
elements that have attributes that end with the value suffix
Remarks
Case insensitive.
See Also

Reference

Element Class


Element.GetElementsByAttributeValueMatching Method

ElementGetElementsByAttributeValueMatching Method

Overload List
 | Name | Description
Public method | GetElementsByAttributeValueMatching(String, String) | Find elements that have attributes whose values match the supplied regular expression.
Public method | GetElementsByAttributeValueMatching(String, Regex) | Find elements that have attributes whose values match the supplied regular expression.
Top
See Also

Reference

Element Class


Element.GetElementsByAttributeValueMatching Method (String, String)

ElementGetElementsByAttributeValueMatching Method (String, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Find elements that have attributes whose values match the supplied regular expression.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByAttributeValueMatching(
    string key,
    string regex
)
Public Function GetElementsByAttributeValueMatching (
    key As String,
    regex As String
) As Elements
member GetElementsByAttributeValueMatching :
        key : string *
        regex : string -> Elements

Parameters

key
Type: SystemString
name of the attribute
regex
Type: SystemString
regular expression to match against attribute values. You can use embedded flags (such as (?i) and (?m) to control regex options.

Return Value

Type: Elements
elements that have attributes matching this regular expression
See Also

Reference

Element Class
GetElementsByAttributeValueMatching Overload


Element.GetElementsByAttributeValueMatching Method (String, Regex)

ElementGetElementsByAttributeValueMatching Method (String, Regex)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Find elements that have attributes whose values match the supplied regular expression.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByAttributeValueMatching(
    string key,
    Regex pattern
)
Public Function GetElementsByAttributeValueMatching (
    key As String,
    pattern As Regex
) As Elements
member GetElementsByAttributeValueMatching :
        key : string *
        pattern : Regex -> Elements

Parameters

key
Type: SystemString
name of the attribute
pattern
Type: System.Text.RegularExpressionsRegex
compiled regular expression to match against attribute values

Return Value

Type: Elements
elements that have attributes matching this regular expression
See Also

Reference

Element Class
GetElementsByAttributeValueMatching Overload


Element.GetElementsByAttributeValueNot Method

ElementGetElementsByAttributeValueNot Method

Find elements that either do not have this attribute, or have it with a different value.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByAttributeValueNot(
    string key,
    string value
)
Public Function GetElementsByAttributeValueNot (
    key As String,
    value As String
) As Elements
member GetElementsByAttributeValueNot :
        key : string *
        value : string -> Elements

Parameters

key
Type: SystemString
name of the attribute
value
Type: SystemString
value of the attribute

Return Value

Type: Elements
elements that do not have a matching attribute
Remarks
Case insensitive.
See Also

Reference

Element Class


Element.GetElementsByAttributeValueStarting Method

ElementGetElementsByAttributeValueStarting Method

Find elements that have attributes that start with the value prefix.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByAttributeValueStarting(
    string key,
    string valuePrefix
)
Public Function GetElementsByAttributeValueStarting (
    key As String,
    valuePrefix As String
) As Elements
member GetElementsByAttributeValueStarting :
        key : string *
        valuePrefix : string -> Elements

Parameters

key
Type: SystemString
name of the attribute
valuePrefix
Type: SystemString
start of attribute value

Return Value

Type: Elements
elements that have attributes that start with the value prefix
Remarks
Case insensitive.
See Also

Reference

Element Class


Element.GetElementsByClass Method

ElementGetElementsByClass Method

Find elements that have this class, including or under this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByClass(
    string className
)
Public Function GetElementsByClass (
    className As String
) As Elements
member GetElementsByClass :
        className : string -> Elements

Parameters

className
Type: SystemString
the name of the class to search for.

Return Value

Type: Elements
elements with the supplied class name, empty if none
Remarks
Case insensitive.

Elements can have multiple classes (e.g. <div class="header round first"> . This method checks each class, so you can find the above with el.GetElementsByClass("header"); .

See Also

Reference

Element Class
Supremes.Nodes Namespace
HasClass(string)
ClassNames


Element.GetElementsByIndexEquals Method

ElementGetElementsByIndexEquals Method

Find elements whose sibling index is equal to the supplied index.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByIndexEquals(
    int index
)
Public Function GetElementsByIndexEquals (
    index As Integer
) As Elements
member GetElementsByIndexEquals :
        index : int -> Elements

Parameters

index
Type: SystemInt32
0-based index

Return Value

Type: Elements
elements equal to index
See Also

Reference

Element Class


Element.GetElementsByIndexGreaterThan Method

ElementGetElementsByIndexGreaterThan Method

Find elements whose sibling index is greater than the supplied index.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByIndexGreaterThan(
    int index
)
Public Function GetElementsByIndexGreaterThan (
    index As Integer
) As Elements
member GetElementsByIndexGreaterThan :
        index : int -> Elements

Parameters

index
Type: SystemInt32
0-based index

Return Value

Type: Elements
elements greater than index
See Also

Reference

Element Class


Element.GetElementsByIndexLessThan Method

ElementGetElementsByIndexLessThan Method

Find elements whose sibling index is less than the supplied index.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByIndexLessThan(
    int index
)
Public Function GetElementsByIndexLessThan (
    index As Integer
) As Elements
member GetElementsByIndexLessThan :
        index : int -> Elements

Parameters

index
Type: SystemInt32
0-based index

Return Value

Type: Elements
elements less than index
See Also

Reference

Element Class


Element.GetElementsByTag Method

ElementGetElementsByTag Method

Finds elements, including and recursively under this element, with the specified tag name.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsByTag(
    string tagName
)
Public Function GetElementsByTag (
    tagName As String
) As Elements
member GetElementsByTag :
        tagName : string -> Elements

Parameters

tagName
Type: SystemString
The tag name to search for (case insensitively).

Return Value

Type: Elements
a matching unmodifiable list of elements. Will be empty if this element and none of its children match.
See Also

Reference

Element Class


Element.GetElementsContainingOwnText Method

ElementGetElementsContainingOwnText Method

Find elements that directly contain the specified string.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsContainingOwnText(
    string searchText
)
Public Function GetElementsContainingOwnText (
    searchText As String
) As Elements
member GetElementsContainingOwnText :
        searchText : string -> Elements

Parameters

searchText
Type: SystemString
to look for in the element's own text

Return Value

Type: Elements
elements that contain the string, case insensitive.
Remarks
The search is case insensitive. The text must appear directly in the element, not in any of its descendants.
See Also

Reference

Element Class
Element.OwnText


Element.GetElementsContainingText Method

ElementGetElementsContainingText Method

Find elements that contain the specified string.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsContainingText(
    string searchText
)
Public Function GetElementsContainingText (
    searchText As String
) As Elements
member GetElementsContainingText :
        searchText : string -> Elements

Parameters

searchText
Type: SystemString
to look for in the element's text

Return Value

Type: Elements
elements that contain the string, case insensitive.
Remarks
The search is case insensitive. The text may appear directly in the element, or in any of its descendants.
See Also

Reference

Element Class
Element.Text


Element.GetElementsMatchingOwnText Method

ElementGetElementsMatchingOwnText Method

Overload List
 | Name | Description
Public method | GetElementsMatchingOwnText(String) | Find elements whose text matches the supplied regular expression.
Public method | GetElementsMatchingOwnText(Regex) | Find elements whose own text matches the supplied regular expression.
Top
See Also

Reference

Element Class


Element.GetElementsMatchingOwnText Method (String)

ElementGetElementsMatchingOwnText Method (String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Find elements whose text matches the supplied regular expression.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsMatchingOwnText(
    string regex
)
Public Function GetElementsMatchingOwnText (
    regex As String
) As Elements
member GetElementsMatchingOwnText :
        regex : string -> Elements

Parameters

regex
Type: SystemString
regular expression to match text against. You can use embedded flags (such as (?i) and (?m) to control regex options.

Return Value

Type: Elements
elements matching the supplied regular expression.
See Also

Reference

Element Class
GetElementsMatchingOwnText Overload
Element.OwnText


Element.GetElementsMatchingOwnText Method (Regex)

ElementGetElementsMatchingOwnText Method (Regex)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Find elements whose own text matches the supplied regular expression.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsMatchingOwnText(
    Regex pattern
)
Public Function GetElementsMatchingOwnText (
    pattern As Regex
) As Elements
member GetElementsMatchingOwnText :
        pattern : Regex -> Elements

Parameters

pattern
Type: System.Text.RegularExpressionsRegex
regular expression to match text against

Return Value

Type: Elements
elements matching the supplied regular expression.
See Also

Reference

Element Class
GetElementsMatchingOwnText Overload
Element.OwnText


Element.GetElementsMatchingText Method

ElementGetElementsMatchingText Method

Overload List
 | Name | Description
Public method | GetElementsMatchingText(String) | Find elements whose text matches the supplied regular expression.
Public method | GetElementsMatchingText(Regex) | Find elements whose text matches the supplied regular expression.
Top
See Also

Reference

Element Class


Element.GetElementsMatchingText Method (String)

ElementGetElementsMatchingText Method (String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Find elements whose text matches the supplied regular expression.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsMatchingText(
    string regex
)
Public Function GetElementsMatchingText (
    regex As String
) As Elements
member GetElementsMatchingText :
        regex : string -> Elements

Parameters

regex
Type: SystemString
regular expression to match text against. You can use embedded flags (such as (?i) and (?m) to control regex options.

Return Value

Type: Elements
elements matching the supplied regular expression.
See Also

Reference

Element Class
GetElementsMatchingText Overload
Element.Text


Element.GetElementsMatchingText Method (Regex)

ElementGetElementsMatchingText Method (Regex)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Find elements whose text matches the supplied regular expression.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements GetElementsMatchingText(
    Regex pattern
)
Public Function GetElementsMatchingText (
    pattern As Regex
) As Elements
member GetElementsMatchingText :
        pattern : Regex -> Elements

Parameters

pattern
Type: System.Text.RegularExpressionsRegex
regular expression to match text against

Return Value

Type: Elements
elements matching the supplied regular expression.
See Also

Reference

Element Class
GetElementsMatchingText Overload
Element.Text


Element.GetHashCode Method

ElementGetHashCode Method

Returns the hash code for this instance.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override int GetHashCode()
Public Overrides Function GetHashCode As Integer
abstract GetHashCode : unit -> int
override GetHashCode : unit -> int

Return Value

Type: Int32

[Missing <returns> documentation for "M:Supremes.Nodes.Element.GetHashCode"]

See Also

Reference

Element Class


Element.HasClass Method

ElementHasClass Method

Tests if this element has a class.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool HasClass(
    string className
)
Public Function HasClass (
    className As String
) As Boolean
member HasClass :
        className : string -> bool

Parameters

className
Type: SystemString
name of class to check for

Return Value

Type: Boolean
true if it does, false if not
Remarks
Case insensitive.
See Also

Reference

Element Class


Element.InsertChildren Method

ElementInsertChildren Method

Inserts the given child nodes into this element at the specified index.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element InsertChildren(
    int index,
    IEnumerable<Node> children
)
Public Function InsertChildren (
    index As Integer,
    children As IEnumerable(Of Node)
) As Element
member InsertChildren :
        index : int *
        children : IEnumerable<Node> -> Element

Parameters

index
Type: SystemInt32
0-based index to insert children at. Specify 0 to insert at the start, -1 at the end
children
Type: System.Collections.GenericIEnumerable Node
child nodes to insert

Return Value

Type: Element
this element, for chaining.
Remarks
Current nodes will be shifted to the right. The inserted nodes will be moved from their current parent. To prevent moving, copy the nodes first.
See Also

Reference

Element Class


Element.Prepend Method

ElementPrepend Method

Add inner HTML into this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element Prepend(
    string html
)
Public Function Prepend (
    html As String
) As Element
member Prepend :
        html : string -> Element

Parameters

html
Type: SystemString
HTML to add inside this element, before the existing HTML

Return Value

Type: Element
this element
Remarks
The supplied HTML will be parsed, and each node prepended to the start of the element's children.
See Also

Reference

Element Class
Html


Element.PrependChild Method

ElementPrependChild Method

Add a node to the start of this element's children.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element PrependChild(
    Node child
)
Public Function PrependChild (
    child As Node
) As Element
member PrependChild :
        child : Node -> Element

Parameters

child
Type: Supremes.NodesNode
node to add.

Return Value

Type: Element
this element, so that you can add more child nodes or elements.
See Also

Reference

Element Class


Element.PrependElement Method

ElementPrependElement Method

Create a new element by tag name, and add it as the first child.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element PrependElement(
    string tagName
)
Public Function PrependElement (
    tagName As String
) As Element
member PrependElement :
        tagName : string -> Element

Parameters

tagName
Type: SystemString
the name of the tag (e.g. div ).

Return Value

Type: Element
the new element, to allow you to add content to it, e.g.: parent.PrependElement("h1").Attr("id", "header").Text("Welcome");
See Also

Reference

Element Class


Element.PrependText Method

ElementPrependText Method

Create and prepend a new TextNode to this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element PrependText(
    string text
)
Public Function PrependText (
    text As String
) As Element
member PrependText :
        text : string -> Element

Parameters

text
Type: SystemString
the unencoded text to add

Return Value

Type: Element
this element
See Also

Reference

Element Class


Element.RemoveClass Method

ElementRemoveClass Method

Remove a class name from this element's class attribute.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element RemoveClass(
    string className
)
Public Function RemoveClass (
    className As String
) As Element
member RemoveClass :
        className : string -> Element

Parameters

className
Type: SystemString
class name to remove

Return Value

Type: Element
this element
See Also

Reference

Element Class


Element.Select Method

ElementSelect Method

Find elements that match the Supremes.Select.Selector CSS query, with this element as the starting context. Matched elements may include this element, or any of its children.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Select(
    string cssQuery
)
Public Function Select (
    cssQuery As String
) As Elements
member Select :
        cssQuery : string -> Elements

Parameters

cssQuery
Type: SystemString
a Supremes.Select.Selector CSS-like query

Return Value

Type: Elements
elements that match the query (empty if none match)
Remarks
This method is generally more powerful to use than the DOM-type GetElementBy* methods, because multiple filters can be combined, e.g.:
  • el.Select("a[href]") - finds links ( a tags with href attributes)
  • el.Select("a[href*=example.com]") - finds links pointing to example.com (loosely)

See the query syntax documentation in Supremes.Select.Selector .

See Also

Reference

Element Class
Supremes.Select.Selector


Element.ToggleClass Method

ElementToggleClass Method

Toggle a class name on this element's class attribute: if present, remove it; otherwise add it.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element ToggleClass(
    string className
)
Public Function ToggleClass (
    className As String
) As Element
member ToggleClass :
        className : string -> Element

Parameters

className
Type: SystemString
class name to toggle

Return Value

Type: Element
this element
See Also

Reference

Element Class


Element.ToString Method

ElementToString Method

Converts the value of this instance to a string.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string ToString()
Public Overrides Function ToString As String
abstract ToString : unit -> string
override ToString : unit -> string

Return Value

Type: String

[Missing <returns> documentation for "M:Supremes.Nodes.Element.ToString"]

See Also

Reference

Element Class


Element.Wrap Method

ElementWrap Method

Wrap the supplied HTML around this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element Wrap(
    string html
)
Public Function Wrap (
    html As String
) As Element
member Wrap :
        html : string -> Element

Parameters

html
Type: SystemString
HTML to wrap around this element, e.g. <div class="head"></div> . Can be arbitrarily deep.

Return Value

Type: Element
this element, for chaining.
See Also

Reference

Element Class


Element Properties

Element Properties

The Element type exposes the following members.

Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Inherited from Node.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | Children | Get this element's child elements.
Public property | ClassName | Gets the literal value of this element's "class" attribute, which may include multiple class names, space separated.
Public property | ClassNames | Get or Set all of the element's class names.
Public property | CssSelector | Get a CSS selector that will uniquely select this element.
Public property | Data | Get the combined data of this element.
Public property | DataNodes | Get this element's child data nodes.
Public property | Dataset | Get this element's HTML5 custom data attributes.
Public property | ElementSiblingIndex | Get the list index of this element in its element sibling list.
Public property | FirstElementSibling | Gets the first element sibling of this element.
Public property | HasText | Test if this element has any text content (that is not just whitespace).
Public property | Html | Get Or Set the element's inner HTML.
Public property | Id | Get the id attribute of this element.
Public property | IsBlock | Test if this element is a block-level element.
Public property | LastElementSibling | Gets the last element sibling of this element
Public property | NextElementSibling | Gets the next sibling element of this element.
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this node. (Inherited from Node.)
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | OwnText | Gets the text owned by this element only; does not get the combined text of all children.
Public property | Parent | Gets this element's parent element.
Public property | Parents | Get this element's parent and ancestors, up to the document root.
Public property | PreviousElementSibling | Gets the previous element sibling of this element.
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | SiblingElements | Get sibling elements.
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Public property | Tag | Get the Tag for this element.
Public property | TagName | Get or Set the name of the tag for this element.
Public property | Text | Get or Set the combined text of this element and all its children.
Public property | TextNodes | Get this element's child text nodes.
Public property | Val | Get or Set the value of a form element (input, textarea, etc).
Top
See Also

Reference

Element Class


Element.Children Property

ElementChildren Property

Get this element's child elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Children { get; }
Public ReadOnly Property Children As Elements
    Get
member Children : Elements with get

Return Value

Type: Elements
child elements. If this element has no children, returns an empty list.
Remarks
This is effectively a filter on Node.ChildNodes to get Element nodes.
See Also

Reference

Element Class
Node.ChildNodes


Element.ClassName Property

ElementClassName Property

Gets the literal value of this element's "class" attribute, which may include multiple class names, space separated.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string ClassName { get; }
Public ReadOnly Property ClassName As String
    Get
member ClassName : string with get

Return Value

Type: String
The literal class attribute, or empty string if no class attribute set.
Remarks
(E.g. on <div class="header gray"> returns, "header gray")
See Also

Reference

Element Class


Element.ClassNames Property

ElementClassNames Property

Get or Set all of the element's class names.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public ICollection<string> ClassNames { get; set; }
Public Property ClassNames As ICollection(Of String)
    Get
    Set
member ClassNames : ICollection<string> with get, set

Property Value

Type: ICollection String
the new set of classes

Return Value

Type: ICollection String
set of classnames, empty if no class attribute
Remarks

E.g. on element <div class="header gray">, this property returns a set of two elements "header", "gray". Note that modifications to this set are not pushed to the backing class attribute; use the ClassNames method to persist them.

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

Element Class
Supremes.Fluent.FluentUtility


Element.CssSelector Property

ElementCssSelector Property

Get a CSS selector that will uniquely select this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string CssSelector { get; }
Public ReadOnly Property CssSelector As String
    Get
member CssSelector : string with get

Return Value

Type: String
the CSS Path that can be used to retrieve the element in a selector.
Remarks
If the element has an ID, returns #id; otherwise returns the parent (if any) CSS selector, followed by '>', followed by a unique selector for the element (tag.class.class:nth-child(n)).
See Also

Reference

Element Class


Element.Data Property

ElementData Property

Get the combined data of this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Data { get; }
Public ReadOnly Property Data As String
    Get
member Data : string with get

Return Value

Type: String
the data, or empty string if none
Remarks
Data is e.g. the inside of a script tag.
See Also

Reference

Element Class
DataNodes


Element.DataNodes Property

ElementDataNodes Property

Get this element's child data nodes.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IReadOnlyList<DataNode> DataNodes { get; }
Public ReadOnly Property DataNodes As IReadOnlyList(Of DataNode)
    Get
member DataNodes : IReadOnlyList<DataNode> with get

Return Value

Type: IReadOnlyList DataNode
child data nodes. If this element has no data nodes, returns an empty list.
Remarks

The list is unmodifiable but the data nodes may be manipulated.

This is effectively a filter on Node.ChildNodes to get Data nodes.

See Also

Reference

Element Class
Data


Element.Dataset Property

ElementDataset Property

Get this element's HTML5 custom data attributes.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IDictionary<string, string> Dataset { get; }
Public ReadOnly Property Dataset As IDictionary(Of String, String)
    Get
member Dataset : IDictionary<string, string> with get

Return Value

Type: IDictionary String, String
a map of key=value custom data attributes.
Remarks
Each attribute in the element that has a key starting with "data-" is included the dataset.

E.g., the element <div data-package="jsoup" data-language="Java" class="group">... has the dataset package=jsoup, language=java .

This map is a filtered view of the element's attribute map. Changes to one map (add, remove, update) are reflected in the other map.

You can find elements that have data attributes using the [^data-] attribute key prefix selector.

See Also

Reference

Element Class


Element.ElementSiblingIndex Property

ElementElementSiblingIndex Property

Get the list index of this element in its element sibling list.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public int ElementSiblingIndex { get; }
Public ReadOnly Property ElementSiblingIndex As Integer
    Get
member ElementSiblingIndex : int with get

Return Value

Type: Int32
position in element sibling list
Remarks
I.e. if this is the first element sibling, returns 0.
See Also

Reference

Element Class


Element.FirstElementSibling Property

ElementFirstElementSibling Property

Gets the first element sibling of this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element FirstElementSibling { get; }
Public ReadOnly Property FirstElementSibling As Element
    Get
member FirstElementSibling : Element with get

Return Value

Type: Element
the first sibling that is an element (aka the parent's first element child)
See Also

Reference

Element Class


Element.HasText Property

ElementHasText Property

Test if this element has any text content (that is not just whitespace).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool HasText { get; }
Public ReadOnly Property HasText As Boolean
    Get
member HasText : bool with get

Return Value

Type: Boolean
true if element has non-blank text content.
See Also

Reference

Element Class


Element.Html Property

ElementHtml Property

Get Or Set the element's inner HTML.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Html { get; set; }
Public Property Html As String
    Get
    Set
member Html : string with get, set

Property Value

Type: String
HTML to parse and set into this element

Return Value

Type: String
String of HTML.
Remarks

when get on a <div> with one empty <p>, would return <p></p>. (Whereas Node.OuterHtml would return <div><p></p></div>.)

when set, clears the existing HTML first.

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

Element Class
Supremes.Nodes Namespace
Node.OuterHtml
Append(string)
Supremes.Fluent.FluentUtility


Element.Id Property

ElementId Property

Get the id attribute of this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Id { get; }
Public ReadOnly Property Id As String
    Get
member Id : string with get

Return Value

Type: String
The id attribute, if present, or an empty string if not.
See Also

Reference

Element Class


Element.IsBlock Property

ElementIsBlock Property

Test if this element is a block-level element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool IsBlock { get; }
Public ReadOnly Property IsBlock As Boolean
    Get
member IsBlock : bool with get

Return Value

Type: Boolean
true if block, false if not (and thus inline)
Remarks
(E.g. <div> == true or an inline element <p> == false ).
See Also

Reference

Element Class


Element.LastElementSibling Property

ElementLastElementSibling Property

Gets the last element sibling of this element

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element LastElementSibling { get; }
Public ReadOnly Property LastElementSibling As Element
    Get
member LastElementSibling : Element with get

Return Value

Type: Element
the last sibling that is an element (aka the parent's last element child)
See Also

Reference

Element Class


Element.NextElementSibling Property

ElementNextElementSibling Property

Gets the next sibling element of this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element NextElementSibling { get; }
Public ReadOnly Property NextElementSibling As Element
    Get
member NextElementSibling : Element with get

Return Value

Type: Element
the next element, or null if there is no next element
Remarks
E.g., if a div contains two p s, the NextElementSibling of the first p is the second p .

This is similar to Node.NextSibling , but specifically finds only Elements

See Also

Reference

Element Class
PreviousElementSibling


Element.OwnText Property

ElementOwnText Property

Gets the text owned by this element only; does not get the combined text of all children.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string OwnText { get; }
Public ReadOnly Property OwnText As String
    Get
member OwnText : string with get

Return Value

Type: String
unencoded text, or empty string if none.
Remarks
For example, given HTML <p>Hello <b>there</b> now!</p> , p.OwnText returns "Hello now!" , whereas p.Text returns "Hello there now!" . Note that the text within the b element is not returned, as it is not a direct child of the p element.
See Also

Reference

Element Class
Supremes.Nodes Namespace
Text
TextNodes


Element.Parent Property

ElementParent Property

Gets this element's parent element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element Parent { get; }
Public ReadOnly Property Parent As Element
    Get
member Parent : Element with get

Return Value

Type: Element
See Also

Reference

Element Class


Element.Parents Property

ElementParents Property

Get this element's parent and ancestors, up to the document root.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Parents { get; }
Public ReadOnly Property Parents As Elements
    Get
member Parents : Elements with get

Return Value

Type: Elements
this element's stack of parents, closest first.
See Also

Reference

Element Class


Element.PreviousElementSibling Property

ElementPreviousElementSibling Property

Gets the previous element sibling of this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element PreviousElementSibling { get; }
Public ReadOnly Property PreviousElementSibling As Element
    Get
member PreviousElementSibling : Element with get

Return Value

Type: Element
the previous element, or null if there is no previous element
See Also

Reference

Element Class
NextElementSibling


Element.SiblingElements Property

ElementSiblingElements Property

Get sibling elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements SiblingElements { get; }
Public ReadOnly Property SiblingElements As Elements
    Get
member SiblingElements : Elements with get

Return Value

Type: Elements
sibling elements
Remarks
If the element has no sibling elements, returns an empty list. An element is not a sibling of itself, so will not be included in the returned list.
See Also

Reference

Element Class


Element.Tag Property

ElementTag Property

Get the Tag for this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Tag Tag { get; }
Public ReadOnly Property Tag As Tag
    Get
member Tag : Tag with get

Return Value

Type: Tag
the tag object
See Also

Reference

Element Class


Element.TagName Property

ElementTagName Property

Get or Set the name of the tag for this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string TagName { get; set; }
Public Property TagName As String
    Get
    Set
member TagName : string with get, set

Property Value

Type: String
the new tag name

Return Value

Type: String
the tag name
Remarks

E.g. div

For example, convert a <span> to a <div> with el.TagName = "div"; .

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

Element Class
Supremes.Fluent.FluentUtility


Element.Text Property

ElementText Property

Get or Set the combined text of this element and all its children.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public virtual string Text { get; set; }
Public Overridable Property Text As String
    Get
    Set
abstract Text : string with get, set
override Text : string with get, set

Property Value

Type: String
unencoded text

Return Value

Type: String
unencoded text, or empty string if none.
Remarks

when get, whitespace is normalized and trimmed.

For example, given HTML <p>Hello <b>there</b> now! </p>, p.Text returns "Hello there now!"

when set, any existing contents (text or elements) will be cleared.

See Also

Reference

Element Class
Supremes.Nodes Namespace
OwnText
TextNodes


Element.TextNodes Property

ElementTextNodes Property

Get this element's child text nodes.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IReadOnlyList<TextNode> TextNodes { get; }
Public ReadOnly Property TextNodes As IReadOnlyList(Of TextNode)
    Get
member TextNodes : IReadOnlyList<TextNode> with get

Return Value

Type: IReadOnlyList TextNode
child text nodes. If this element has no text nodes, returns an empty list.

For example, with the input HTML: <p>One <span>Two</span> Three <br /> Four</p> with the p element selected:

  • p.Text = "One Two Three Four"
  • p.OwnText = "One Three Four"
  • p.Children = Elements[<span>, <br />]
  • p.ChildNodes = List<Node>["One ", <span>, " Three ", <br />, " Four"]
  • p.TextNodes = List<TextNode>["One ", " Three ", " Four"]
Remarks
The list is unmodifiable but the text nodes may be manipulated.

This is effectively a filter on Node.ChildNodes to get Text nodes.

See Also

Reference

Element Class


Element.Val Property

ElementVal Property

Get or Set the value of a form element (input, textarea, etc).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Val { get; set; }
Public Property Val As String
    Get
    Set
member Val : string with get, set

Property Value

Type: String
value to set

Return Value

Type: String
the value of the form element, or empty string if not set.
Remarks

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

Element Class
Supremes.Fluent.FluentUtility


Elements Class

Elements Class

A list of Element s, with methods that act on every element in the list.

To get an Elements object, use the Element.Select(string) method.

Inheritance Hierarchy
SystemObject
Supremes.NodesElements

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class Elements : IList<Element>,
    ICollection<Element>, IEnumerable<Element>, IEnumerable
Public NotInheritable Class Elements
    Implements IList(Of Element), ICollection(Of Element),
    IEnumerable(Of Element), IEnumerable
[<SealedAttribute>]
type Elements =
    class
        interface IList<Element>
        interface ICollection<Element>
        interface IEnumerable<Element>
        interface IEnumerable
    end

The Elements type exposes the following members.

Methods
 | Name | Description
Public method | Add | Adds an item to the Elements.
Public method | AddClass | Add the class name to every matched element's class attribute.
Public method | After | Insert the supplied HTML after each matched element's outer HTML.
Public method | Append | Add the supplied HTML to the end of each matched element's inner HTML.
Public method | Attr(String) | Get an attribute value from the first matched element that has the attribute.
Public method | Attr(String, String) | Set an attribute on all matched elements.
Public method | Before | Insert the supplied HTML before each matched element's outer HTML.
Public method | Clear | Removes all items from the Elements.
Public method | Contains | Determines whether the Elements contains a specific value.
Public method | Empty | Empty (remove all child nodes from) each matched element.
Public method | Eq | Get the nth matched element as an Elements object.
Public method | Equals | Compares two Elements instances for equality. (Overrides ObjectEquals(Object).)
Public method | GetEnumerator | Returns the hash code for this instance.
Public method | GetHashCode | Returns the hash code for this instance. (Overrides ObjectGetHashCode.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Checks if any of the matched elements have this attribute set.
Public method | HasClass | Determine if any of the matched elements have this class name set in their class attribute.
Public method | IndexOf | Determines the index of a specific item in the Elements.
Public method | Insert | Inserts an item to the Elements at the specified index.
Public method | Is | Test if any of the matched elements match the supplied query.
Public method | Not | Remove elements from this list that match the Supremes.Select.Selector query.
Public method | Prepend | Add the supplied HTML to the start of each matched element's inner HTML.
Public method | Remove | Remove each matched element from the DOM.
Public method | Remove(Element) | Removes the first occurrence of a specific object from the Elements.
Public method | RemoveAt | Removes the Elements item at the specified index.
Public method | RemoveAttr | Remove an attribute from every matched element.
Public method | RemoveClass | Remove the class name from every matched element's class attribute, if present.
Public method | Select | Find matching elements within this element list.
Public method | ToggleClass | Toggle the class name on every matched element's class attribute.
Public method | ToString | Get the combined outer HTML of all matched elements. (Overrides ObjectToString.)
Public method | Unwrap | Removes the matched elements from the DOM, and moves their children up into their parents.
Public method | Wrap | Wrap the supplied HTML around each matched elements.
Top
Extension Methods
 | Name | Description
Public Extension Method | Html | Set the inner HTML of each matched element, and returns the elements itself. (Defined by FluentUtility.)
Public Extension Method | TagName | Set the tag name of each matched element, and returns the elements itself. (Defined by FluentUtility.)
Public Extension Method | Val | Set the form element's value in each of the matched elements, and returns the elements itself. (Defined by FluentUtility.)
Top
Properties
 | Name | Description
Public property | Count | Gets the number of elements contained in the Elements.
Public property | First | Get the first matched element.
Public property | Forms | Get the FormElement forms from the selected elements, if any.
Public property | HasText | Determine if any of the matched elements have a text content (that is not just whitespace).
Public property | Html | Get the combined inner HTML of all matched elements. Set the inner HTML of each matched element.
Public property | Item | Gets or sets the element at the specified index.
Public property | Last | Get the last matched element.
Public property | OuterHtml | Get the combined outer HTML of all matched elements.
Public property | Parents | Get all of the parents and ancestor elements of the matched elements.
Public property | TagName | Get the tag name of the first matched element. Set the tag name of each matched element.
Public property | Text | Get the combined text of all the matched elements.
Public property | Val | Get the form element's value of the first matched element. Set the form element's value in each of the matched elements.
Top
See Also

Reference


Elements Methods

Elements Methods

The Elements type exposes the following members.

Methods
 | Name | Description
Public method | Add | Adds an item to the Elements.
Public method | AddClass | Add the class name to every matched element's class attribute.
Public method | After | Insert the supplied HTML after each matched element's outer HTML.
Public method | Append | Add the supplied HTML to the end of each matched element's inner HTML.
Public method | Attr(String) | Get an attribute value from the first matched element that has the attribute.
Public method | Attr(String, String) | Set an attribute on all matched elements.
Public method | Before | Insert the supplied HTML before each matched element's outer HTML.
Public method | Clear | Removes all items from the Elements.
Public method | Contains | Determines whether the Elements contains a specific value.
Public method | Empty | Empty (remove all child nodes from) each matched element.
Public method | Eq | Get the nth matched element as an Elements object.
Public method | Equals | Compares two Elements instances for equality. (Overrides ObjectEquals(Object).)
Public method | GetEnumerator | Returns the hash code for this instance.
Public method | GetHashCode | Returns the hash code for this instance. (Overrides ObjectGetHashCode.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Checks if any of the matched elements have this attribute set.
Public method | HasClass | Determine if any of the matched elements have this class name set in their class attribute.
Public method | IndexOf | Determines the index of a specific item in the Elements.
Public method | Insert | Inserts an item to the Elements at the specified index.
Public method | Is | Test if any of the matched elements match the supplied query.
Public method | Not | Remove elements from this list that match the Supremes.Select.Selector query.
Public method | Prepend | Add the supplied HTML to the start of each matched element's inner HTML.
Public method | Remove | Remove each matched element from the DOM.
Public method | Remove(Element) | Removes the first occurrence of a specific object from the Elements.
Public method | RemoveAt | Removes the Elements item at the specified index.
Public method | RemoveAttr | Remove an attribute from every matched element.
Public method | RemoveClass | Remove the class name from every matched element's class attribute, if present.
Public method | Select | Find matching elements within this element list.
Public method | ToggleClass | Toggle the class name on every matched element's class attribute.
Public method | ToString | Get the combined outer HTML of all matched elements. (Overrides ObjectToString.)
Public method | Unwrap | Removes the matched elements from the DOM, and moves their children up into their parents.
Public method | Wrap | Wrap the supplied HTML around each matched elements.
Top
Extension Methods
 | Name | Description
Public Extension Method | Html | Set the inner HTML of each matched element, and returns the elements itself. (Defined by FluentUtility.)
Public Extension Method | TagName | Set the tag name of each matched element, and returns the elements itself. (Defined by FluentUtility.)
Public Extension Method | Val | Set the form element's value in each of the matched elements, and returns the elements itself. (Defined by FluentUtility.)
Top
See Also

Reference

Elements Class


Elements.Add Method

ElementsAdd Method

Adds an item to the Elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public void Add(
    Element element
)
Public Sub Add (
    element As Element
)
abstract Add :
        element : Element -> unit
override Add :
        element : Element -> unit

Parameters

element
Type: Supremes.NodesElement

Implements

ICollectionTAdd(T)
See Also

Reference

Elements Class


Elements.AddClass Method

ElementsAddClass Method

Add the class name to every matched element's class attribute.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements AddClass(
    string className
)
Public Function AddClass (
    className As String
) As Elements
member AddClass :
        className : string -> Elements

Parameters

className
Type: SystemString
class name to add

Return Value

Type: Elements
this
See Also

Reference

Elements Class


Elements.After Method

ElementsAfter Method

Insert the supplied HTML after each matched element's outer HTML.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements After(
    string html
)
Public Function After (
    html As String
) As Elements
member After :
        html : string -> Elements

Parameters

html
Type: SystemString
HTML to insert after each element

Return Value

Type: Elements
this, for chaining
See Also

Reference

Elements Class
Supremes.Nodes Namespace
Node.After(string)


Elements.Append Method

ElementsAppend Method

Add the supplied HTML to the end of each matched element's inner HTML.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Append(
    string html
)
Public Function Append (
    html As String
) As Elements
member Append :
        html : string -> Elements

Parameters

html
Type: SystemString
HTML to add inside each element, after the existing HTML

Return Value

Type: Elements
this, for chaining
See Also

Reference

Elements Class
Supremes.Nodes Namespace
Element.Append(string)


Elements.Attr Method

ElementsAttr Method

Overload List
 | Name | Description
Public method | Attr(String) | Get an attribute value from the first matched element that has the attribute.
Public method | Attr(String, String) | Set an attribute on all matched elements.
Top
See Also

Reference

Elements Class


Elements.Attr Method (String)

ElementsAttr Method (String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Get an attribute value from the first matched element that has the attribute.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Attr(
    string attributeKey
)
Public Function Attr (
    attributeKey As String
) As String
member Attr :
        attributeKey : string -> string

Parameters

attributeKey
Type: SystemString
The attribute key.

Return Value

Type: String
The attribute value from the first matched element that has the attribute. If no elements were matched (isEmpty() == true), or if the no elements have the attribute, returns empty string.
See Also

Reference

Elements Class
Attr Overload
Supremes.Nodes Namespace
HasAttr(string)


Elements.Attr Method (String, String)

ElementsAttr Method (String, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set an attribute on all matched elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Attr(
    string attributeKey,
    string attributeValue
)
Public Function Attr (
    attributeKey As String,
    attributeValue As String
) As Elements
member Attr :
        attributeKey : string *
        attributeValue : string -> Elements

Parameters

attributeKey
Type: SystemString
attribute key
attributeValue
Type: SystemString
attribute value

Return Value

Type: Elements
this
See Also

Reference

Elements Class
Attr Overload


Elements.Before Method

ElementsBefore Method

Insert the supplied HTML before each matched element's outer HTML.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Before(
    string html
)
Public Function Before (
    html As String
) As Elements
member Before :
        html : string -> Elements

Parameters

html
Type: SystemString
HTML to insert before each element

Return Value

Type: Elements
this, for chaining
See Also

Reference

Elements Class
Supremes.Nodes Namespace
Node.Before(string)


Elements.Clear Method

ElementsClear Method

Removes all items from the Elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public void Clear()
Public Sub Clear
abstract Clear : unit -> unit
override Clear : unit -> unit

Implements

ICollectionTClear
See Also

Reference

Elements Class


Elements.Contains Method

ElementsContains Method

Determines whether the Elements contains a specific value.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool Contains(
    Object o
)
Public Function Contains (
    o As Object
) As Boolean
member Contains :
        o : Object -> bool

Parameters

o
Type: SystemObject

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Supremes.Nodes.Elements.Contains(System.Object)"]

See Also

Reference

Elements Class


Elements.Empty Method

ElementsEmpty Method

Empty (remove all child nodes from) each matched element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Empty()
Public Function Empty As Elements
member Empty : unit -> Elements

Return Value

Type: Elements
this, for chaining
Remarks

This is similar to setting the inner HTML of each element to nothing.

E.g. HTML: <div><p>Hello <b>there</b></p> <p>now</p></div>
doc.Select("p").Empty();
HTML = <div><p></p> <p></p></div>

See Also

Reference

Elements Class
Supremes.Nodes Namespace
Element.Empty()
Remove()


Elements.Eq Method

ElementsEq Method

Get the nth matched element as an Elements object.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Eq(
    int index
)
Public Function Eq (
    index As Integer
) As Elements
member Eq :
        index : int -> Elements

Parameters

index
Type: SystemInt32
the (zero-based) index of the element in the list to retain

Return Value

Type: Elements
Elements containing only the specified element, or, if that element did not exist, an empty list.
Remarks
See also this[int] to retrieve an Element.
See Also

Reference

Elements Class


Elements.Equals Method

ElementsEquals Method

Compares two Elements instances for equality.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override bool Equals(
    Object obj
)
Public Overrides Function Equals (
    obj As Object
) As Boolean
abstract Equals :
        obj : Object -> bool
override Equals :
        obj : Object -> bool

Parameters

obj
Type: SystemObject

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Supremes.Nodes.Elements.Equals(System.Object)"]

See Also

Reference

Elements Class


Elements.GetEnumerator Method

ElementsGetEnumerator Method

Returns the hash code for this instance.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IEnumerator<Element> GetEnumerator()
Public Function GetEnumerator As IEnumerator(Of Element)
abstract GetEnumerator : unit -> IEnumerator<Element>
override GetEnumerator : unit -> IEnumerator<Element>

Return Value

Type: IEnumerator Element

[Missing <returns> documentation for "M:Supremes.Nodes.Elements.GetEnumerator"]

Implements

IEnumerableTGetEnumerator
See Also

Reference

Elements Class


Elements.GetHashCode Method

ElementsGetHashCode Method

Returns the hash code for this instance.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override int GetHashCode()
Public Overrides Function GetHashCode As Integer
abstract GetHashCode : unit -> int
override GetHashCode : unit -> int

Return Value

Type: Int32

[Missing <returns> documentation for "M:Supremes.Nodes.Elements.GetHashCode"]

See Also

Reference

Elements Class


Elements.HasAttr Method

ElementsHasAttr Method

Checks if any of the matched elements have this attribute set.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool HasAttr(
    string attributeKey
)
Public Function HasAttr (
    attributeKey As String
) As Boolean
member HasAttr :
        attributeKey : string -> bool

Parameters

attributeKey
Type: SystemString
attribute key

Return Value

Type: Boolean
true if any of the elements have the attribute; false if none do.
See Also

Reference

Elements Class


Elements.HasClass Method

ElementsHasClass Method

Determine if any of the matched elements have this class name set in their class attribute.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool HasClass(
    string className
)
Public Function HasClass (
    className As String
) As Boolean
member HasClass :
        className : string -> bool

Parameters

className
Type: SystemString
class name to check for

Return Value

Type: Boolean
true if any do, false if none do
See Also

Reference

Elements Class


Elements.IndexOf Method

ElementsIndexOf Method

Determines the index of a specific item in the Elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public int IndexOf(
    Element element
)
Public Function IndexOf (
    element As Element
) As Integer
abstract IndexOf :
        element : Element -> int
override IndexOf :
        element : Element -> int

Parameters

element
Type: Supremes.NodesElement

Return Value

Type: Int32

[Missing <returns> documentation for "M:Supremes.Nodes.Elements.IndexOf(Supremes.Nodes.Element)"]

Implements

IListTIndexOf(T)
See Also

Reference

Elements Class


Elements.Insert Method

ElementsInsert Method

Inserts an item to the Elements at the specified index.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public void Insert(
    int index,
    Element element
)
Public Sub Insert (
    index As Integer,
    element As Element
)
abstract Insert :
        index : int *
        element : Element -> unit
override Insert :
        index : int *
        element : Element -> unit

Parameters

index
Type: SystemInt32
element
Type: Supremes.NodesElement

Implements

IListTInsert(Int32, T)
See Also

Reference

Elements Class


Elements.Is Method

ElementsIs Method

Test if any of the matched elements match the supplied query.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool Is(
    string query
)
Public Function Is (
    query As String
) As Boolean
member Is :
        query : string -> bool

Parameters

query
Type: SystemString
A selector

Return Value

Type: Boolean
true if at least one element in the list matches the query.
See Also

Reference

Elements Class


Elements.Not Method

ElementsNot Method

Remove elements from this list that match the Supremes.Select.Selector query.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Not(
    string query
)
Public Function Not (
    query As String
) As Elements
member Not :
        query : string -> Elements

Parameters

query
Type: SystemString
the selector query whose results should be removed from these elements

Return Value

Type: Elements
a new elements list that contains only the filtered results
Remarks

E.g. HTML: <div class=logo>One</div> <div>Two</div>
Elements divs = doc.select("div").not("#logo");
Result: divs: [

Two
]

See Also

Reference

Elements Class


Elements.Prepend Method

ElementsPrepend Method

Add the supplied HTML to the start of each matched element's inner HTML.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Prepend(
    string html
)
Public Function Prepend (
    html As String
) As Elements
member Prepend :
        html : string -> Elements

Parameters

html
Type: SystemString
HTML to add inside each element, before the existing HTML

Return Value

Type: Elements
this, for chaining
See Also

Reference

Elements Class
Supremes.Nodes Namespace
Element.Prepend(string)


Elements.Remove Method

ElementsRemove Method

Overload List
 | Name | Description
Public method | Remove | Remove each matched element from the DOM.
Public method | Remove(Element) | Removes the first occurrence of a specific object from the Elements.
Top
See Also

Reference

Elements Class


Elements.Remove Method

ElementsRemove Method

Remove each matched element from the DOM.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Remove()
Public Function Remove As Elements
member Remove : unit -> Elements

Return Value

Type: Elements
this, for chaining
Remarks

This is similar to setting the outer HTML of each element to nothing.

E.g. HTML: <div><p>Hello</p> <p>there</p> <img /></div>
doc.Select("p").Remove();
HTML = <div> <img /></div>

Note that this method should not be used to clean user-submitted HTML; rather, use Supremes.Safety.Cleaner to clean HTML.

See Also

Reference

Elements Class
Remove Overload
Supremes.Nodes Namespace
Element.Empty()
Empty()


Elements.Remove Method (Element)

ElementsRemove Method (Element)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Removes the first occurrence of a specific object from the Elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool Remove(
    Element element
)
Public Function Remove (
    element As Element
) As Boolean
abstract Remove :
        element : Element -> bool
override Remove :
        element : Element -> bool

Parameters

element
Type: Supremes.NodesElement

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Supremes.Nodes.Elements.Remove(Supremes.Nodes.Element)"]

Implements

ICollectionTRemove(T)
See Also

Reference

Elements Class
Remove Overload


Elements.RemoveAt Method

ElementsRemoveAt Method

Removes the Elements item at the specified index.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public void RemoveAt(
    int index
)
Public Sub RemoveAt (
    index As Integer
)
abstract RemoveAt :
        index : int -> unit
override RemoveAt :
        index : int -> unit

Parameters

index
Type: SystemInt32

Implements

IListTRemoveAt(Int32)
See Also

Reference

Elements Class


Elements.RemoveAttr Method

ElementsRemoveAttr Method

Remove an attribute from every matched element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements RemoveAttr(
    string attributeKey
)
Public Function RemoveAttr (
    attributeKey As String
) As Elements
member RemoveAttr :
        attributeKey : string -> Elements

Parameters

attributeKey
Type: SystemString
The attribute to remove.

Return Value

Type: Elements
this (for chaining)
See Also

Reference

Elements Class


Elements.RemoveClass Method

ElementsRemoveClass Method

Remove the class name from every matched element's class attribute, if present.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements RemoveClass(
    string className
)
Public Function RemoveClass (
    className As String
) As Elements
member RemoveClass :
        className : string -> Elements

Parameters

className
Type: SystemString
class name to remove

Return Value

Type: Elements
this
See Also

Reference

Elements Class


Elements.Select Method

ElementsSelect Method

Find matching elements within this element list.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Select(
    string query
)
Public Function Select (
    query As String
) As Elements
member Select :
        query : string -> Elements

Parameters

query
Type: SystemString
A Supremes.Select.Selector query

Return Value

Type: Elements
the filtered list of elements, or an empty list if none match.
See Also

Reference

Elements Class


Elements.ToggleClass Method

ElementsToggleClass Method

Toggle the class name on every matched element's class attribute.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements ToggleClass(
    string className
)
Public Function ToggleClass (
    className As String
) As Elements
member ToggleClass :
        className : string -> Elements

Parameters

className
Type: SystemString
class name to add if missing, or remove if present, from every element.

Return Value

Type: Elements
this
See Also

Reference

Elements Class


Elements.ToString Method

ElementsToString Method

Get the combined outer HTML of all matched elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string ToString()
Public Overrides Function ToString As String
abstract ToString : unit -> string
override ToString : unit -> string

Return Value

Type: String
string of all element's outer HTML.
Remarks
Alias of OuterHtml .
See Also

Reference

Elements Class
Supremes.Nodes Namespace
Text
Html


Elements.Unwrap Method

ElementsUnwrap Method

Removes the matched elements from the DOM, and moves their children up into their parents.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Unwrap()
Public Function Unwrap As Elements
member Unwrap : unit -> Elements

Return Value

Type: Elements
this (for chaining)
Remarks

This has the effect of dropping the elements but keeping their children.

This is useful for e.g removing unwanted formatting elements but keeping their contents.

E.g. with HTML: <div><font>One</font> <font><a href="/">Two</a></font></div>
doc.Select("font").Unwrap();
HTML = <div>One <a href="/">Two</a></div>

See Also

Reference

Elements Class
Supremes.Nodes Namespace
Node.Unwrap()


Elements.Wrap Method

ElementsWrap Method

Wrap the supplied HTML around each matched elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Wrap(
    string html
)
Public Function Wrap (
    html As String
) As Elements
member Wrap :
        html : string -> Elements

Parameters

html
Type: SystemString
HTML to wrap around each element, e.g. <div class="head"></div> . Can be arbitrarily deep.

Return Value

Type: Elements
this (for chaining)
Remarks
For example, with HTML <p><b>This</b> is <b>Nsoup</b></p> , doc.Select("b").Wrap("<i></i>"); becomes <p><i><b>This</b></i> is <i><b>jsoup</b></i></p>
See Also

Reference

Elements Class
Supremes.Nodes Namespace
Element.Wrap(string)


Elements Properties

Elements Properties

The Elements type exposes the following members.

Properties
 | Name | Description
Public property | Count | Gets the number of elements contained in the Elements.
Public property | First | Get the first matched element.
Public property | Forms | Get the FormElement forms from the selected elements, if any.
Public property | HasText | Determine if any of the matched elements have a text content (that is not just whitespace).
Public property | Html | Get the combined inner HTML of all matched elements. Set the inner HTML of each matched element.
Public property | Item | Gets or sets the element at the specified index.
Public property | Last | Get the last matched element.
Public property | OuterHtml | Get the combined outer HTML of all matched elements.
Public property | Parents | Get all of the parents and ancestor elements of the matched elements.
Public property | TagName | Get the tag name of the first matched element. Set the tag name of each matched element.
Public property | Text | Get the combined text of all the matched elements.
Public property | Val | Get the form element's value of the first matched element. Set the form element's value in each of the matched elements.
Top
See Also

Reference

Elements Class


Elements.Count Property

ElementsCount Property

Gets the number of elements contained in the Elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public int Count { get; }
Public ReadOnly Property Count As Integer
    Get
abstract Count : int with get
override Count : int with get

Property Value

Type: Int32

Implements

ICollectionTCount
See Also

Reference

Elements Class


Elements.First Property

ElementsFirst Property

Get the first matched element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element First { get; }
Public ReadOnly Property First As Element
    Get
member First : Element with get

Return Value

Type: Element
The first matched element, or null if contents is empty.
See Also

Reference

Elements Class


Elements.Forms Property

ElementsForms Property

Get the FormElement forms from the selected elements, if any.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IReadOnlyList<FormElement> Forms { get; }
Public ReadOnly Property Forms As IReadOnlyList(Of FormElement)
    Get
member Forms : IReadOnlyList<FormElement> with get

Return Value

Type: IReadOnlyList FormElement
a list of FormElement s pulled from the matched elements. The list will be empty if the elements contain no forms.
See Also

Reference

Elements Class


Elements.HasText Property

ElementsHasText Property

Determine if any of the matched elements have a text content (that is not just whitespace).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool HasText { get; }
Public ReadOnly Property HasText As Boolean
    Get
member HasText : bool with get

Return Value

Type: Boolean
See Also

Reference

Elements Class


Elements.Html Property

ElementsHtml Property

Get the combined inner HTML of all matched elements. Set the inner HTML of each matched element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Html { get; set; }
Public Property Html As String
    Get
    Set
member Html : string with get, set

Property Value

Type: String
HTML to parse and set into each matched element.

Return Value

Type: String
string of all element's inner HTML.
Remarks

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

Elements Class
Supremes.Nodes Namespace
Text
OuterHtml
Element.Html
Supremes.Fluent.FluentUtility


Elements.Item Property

ElementsItem Property

Gets or sets the element at the specified index.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element this[
    int index
] { get; set; }
Public Default Property Item (
    index As Integer
) As Element
    Get
    Set
abstract Item : Element with get, set
override Item : Element with get, set

Parameters

index
Type: SystemInt32

Property Value

Type: Element

Implements

IListTItemInt32
See Also

Reference

Elements Class


Elements.Last Property

ElementsLast Property

Get the last matched element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Element Last { get; }
Public ReadOnly Property Last As Element
    Get
member Last : Element with get

Return Value

Type: Element
The last matched element, or null if contents is empty.
See Also

Reference

Elements Class


Elements.OuterHtml Property

ElementsOuterHtml Property

Get the combined outer HTML of all matched elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string OuterHtml { get; }
Public ReadOnly Property OuterHtml As String
    Get
member OuterHtml : string with get

Return Value

Type: String
string of all element's outer HTML.
See Also

Reference

Elements Class
Supremes.Nodes Namespace
Text
Html


Elements.Parents Property

ElementsParents Property

Get all of the parents and ancestor elements of the matched elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Parents { get; }
Public ReadOnly Property Parents As Elements
    Get
member Parents : Elements with get

Return Value

Type: Elements
all of the parents and ancestor elements of the matched elements
See Also

Reference

Elements Class


Elements.TagName Property

ElementsTagName Property

Get the tag name of the first matched element. Set the tag name of each matched element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string TagName { get; set; }
Public Property TagName As String
    Get
    Set
member TagName : string with get, set

Property Value

Type: String
the new tag name

Return Value

Type: String
The tag name of the first matched element, or empty if not matched.
Remarks

For example, to change each <i> to a <em> , do doc.Select("i").TagName = "em";

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

Elements Class
Supremes.Nodes Namespace
Element.TagName
Supremes.Fluent.FluentUtility


Elements.Text Property

ElementsText Property

Get the combined text of all the matched elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Text { get; }
Public ReadOnly Property Text As String
    Get
member Text : string with get

Return Value

Type: String
string of all text: unescaped and no HTML.
Remarks
Note that it is possible to get repeats if the matched elements contain both parent elements and their own children, as the Element.text() method returns the combined text of a parent and all its children.
See Also

Reference

Elements Class
Element.Text


Elements.Val Property

ElementsVal Property

Get the form element's value of the first matched element. Set the form element's value in each of the matched elements.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Val { get; set; }
Public Property Val As String
    Get
    Set
member Val : string with get, set

Property Value

Type: String
The value to set into each matched element

Return Value

Type: String
The form element's value, or empty if not set.
Remarks

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

Elements Class
Supremes.Nodes Namespace
Element.Val
Supremes.Fluent.FluentUtility


FormElement Class

FormElement Class

A HTML Form Element provides ready access to the form fields/controls that are associated with it.
Inheritance Hierarchy
SystemObject
Supremes.NodesNode
Supremes.NodesElement
Supremes.NodesFormElement

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class FormElement : Element
Public NotInheritable Class FormElement
    Inherits Element
[<SealedAttribute>]
type FormElement =
    class
        inherit Element
    end

The FormElement type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>). (Inherited from Node.)
Public method | AddClass | Add a class name to this element's class attribute. (Inherited from Element.)
Public method | AddElement | Add a form control element to this form.
Public method | After(String) | Insert the specified HTML into the DOM after this element (as a following sibling). (Inherited from Element.)
Public method | After(Node) | Insert the specified node into the DOM after this node (as a following sibling). (Inherited from Element.)
Public method | Append | Add inner HTML to this element. (Inherited from Element.)
Public method | AppendChild | Add a node child node to this element. (Inherited from Element.)
Public method | AppendElement | Create a new element by tag name, and add it as the last child. (Inherited from Element.)
Public method | AppendText | Create and append a new TextNode to this element. (Inherited from Element.)
Public method | Attr(String) | Get an attribute's value by its key. (Inherited from Node.)
Public method | Attr(String, String) | Set an attribute (key=value). (Inherited from Node.)
Public method | Before(String) | Insert the specified HTML into the DOM before this element (as a preceding sibling). (Inherited from Element.)
Public method | Before(Node) | Insert the specified node into the DOM before this node (as a preceding sibling). (Inherited from Element.)
Public method | Child | Get a child element of this element, by its 0-based index number. (Inherited from Element.)
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | Empty | Remove all of the element's child nodes. (Inherited from Element.)
Public method | Equals | Compares two Element instances for equality. (Inherited from Element.)
Public method | GetAllElements | Find all elements under this element (including self, and children of children). (Inherited from Element.)
Public method | GetElementById | Find an element by ID, including or under this element. (Inherited from Element.)
Public method | GetElementsByAttribute | Find elements that have a named attribute set. (Inherited from Element.)
Public method | GetElementsByAttributeStarting | Find elements that have an attribute name starting with the supplied prefix. (Inherited from Element.)
Public method | GetElementsByAttributeValue | Find elements that have an attribute with the specific value. (Inherited from Element.)
Public method | GetElementsByAttributeValueContaining | Find elements that have attributes whose value contains the match string. (Inherited from Element.)
Public method | GetElementsByAttributeValueEnding | Find elements that have attributes that end with the value suffix. (Inherited from Element.)
Public method | GetElementsByAttributeValueMatching(String, String) | Find elements that have attributes whose values match the supplied regular expression. (Inherited from Element.)
Public method | GetElementsByAttributeValueMatching(String, Regex) | Find elements that have attributes whose values match the supplied regular expression. (Inherited from Element.)
Public method | GetElementsByAttributeValueNot | Find elements that either do not have this attribute, or have it with a different value. (Inherited from Element.)
Public method | GetElementsByAttributeValueStarting | Find elements that have attributes that start with the value prefix. (Inherited from Element.)
Public method | GetElementsByClass | Find elements that have this class, including or under this element. (Inherited from Element.)
Public method | GetElementsByIndexEquals | Find elements whose sibling index is equal to the supplied index. (Inherited from Element.)
Public method | GetElementsByIndexGreaterThan | Find elements whose sibling index is greater than the supplied index. (Inherited from Element.)
Public method | GetElementsByIndexLessThan | Find elements whose sibling index is less than the supplied index. (Inherited from Element.)
Public method | GetElementsByTag | Finds elements, including and recursively under this element, with the specified tag name. (Inherited from Element.)
Public method | GetElementsContainingOwnText | Find elements that directly contain the specified string. (Inherited from Element.)
Public method | GetElementsContainingText | Find elements that contain the specified string. (Inherited from Element.)
Public method | GetElementsMatchingOwnText(String) | Find elements whose text matches the supplied regular expression. (Inherited from Element.)
Public method | GetElementsMatchingOwnText(Regex) | Find elements whose own text matches the supplied regular expression. (Inherited from Element.)
Public method | GetElementsMatchingText(String) | Find elements whose text matches the supplied regular expression. (Inherited from Element.)
Public method | GetElementsMatchingText(Regex) | Find elements whose text matches the supplied regular expression. (Inherited from Element.)
Public method | GetHashCode | Returns the hash code for this instance. (Inherited from Element.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Inherited from Node.)
Public method | HasClass | Tests if this element has a class. (Inherited from Element.)
Public method | InsertChildren | Inserts the given child nodes into this element at the specified index. (Inherited from Element.)
Public method | Prepend | Add inner HTML into this element. (Inherited from Element.)
Public method | PrependChild | Add a node to the start of this element's children. (Inherited from Element.)
Public method | PrependElement | Create a new element by tag name, and add it as the first child. (Inherited from Element.)
Public method | PrependText | Create and prepend a new TextNode to this element. (Inherited from Element.)
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Inherited from Node.)
Public method | RemoveClass | Remove a class name from this element's class attribute. (Inherited from Element.)
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | Select | Find elements that match the Supremes.Select.Selector CSS query, with this element as the starting context. Matched elements may include this element, or any of its children. (Inherited from Element.)
Public method | SubmitAsync(HttpClient) | submit this form, using a specified HttpClient.
Public method | SubmitAsync(HttpClient, CancellationToken) | submit this form, using a specified HttpClient.
Public method | ToggleClass | Toggle a class name on this element's class attribute: if present, remove it; otherwise add it. (Inherited from Element.)
Public method | ToString | Converts the value of this instance to a string. (Inherited from Element.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this element. (Inherited from Element.)
Top
Extension Methods
 | Name | Description
Public Extension Method | ClassNames | Set all of the specified element's class names, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | Html | Set the specified element's inner HTML, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | TagName | Set the name of the tag for the specified element, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | Val | Set the value of the specified form element (input, textarea, etc), and returns the element itself. (Defined by FluentUtility.)
Top
Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Inherited from Node.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | Children | Get this element's child elements. (Inherited from Element.)
Public property | ClassName | Gets the literal value of this element's "class" attribute, which may include multiple class names, space separated. (Inherited from Element.)
Public property | ClassNames | Get or Set all of the element's class names. (Inherited from Element.)
Public property | CssSelector | Get a CSS selector that will uniquely select this element. (Inherited from Element.)
Public property | Data | Get the combined data of this element. (Inherited from Element.)
Public property | DataNodes | Get this element's child data nodes. (Inherited from Element.)
Public property | Dataset | Get this element's HTML5 custom data attributes. (Inherited from Element.)
Public property | Elements | Get the list of form control elements associated with this form.
Public property | ElementSiblingIndex | Get the list index of this element in its element sibling list. (Inherited from Element.)
Public property | FirstElementSibling | Gets the first element sibling of this element. (Inherited from Element.)
Public property | FormData | Get the data that this form submits.
Public property | HasText | Test if this element has any text content (that is not just whitespace). (Inherited from Element.)
Public property | Html | Get Or Set the element's inner HTML. (Inherited from Element.)
Public property | Id | Get the id attribute of this element. (Inherited from Element.)
Public property | IsBlock | Test if this element is a block-level element. (Inherited from Element.)
Public property | LastElementSibling | Gets the last element sibling of this element (Inherited from Element.)
Public property | NextElementSibling | Gets the next sibling element of this element. (Inherited from Element.)
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this node. (Inherited from Node.)
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | OwnText | Gets the text owned by this element only; does not get the combined text of all children. (Inherited from Element.)
Public property | Parent | Gets this element's parent element. (Inherited from Element.)
Public property | Parents | Get this element's parent and ancestors, up to the document root. (Inherited from Element.)
Public property | PreviousElementSibling | Gets the previous element sibling of this element. (Inherited from Element.)
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | SiblingElements | Get sibling elements. (Inherited from Element.)
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Public property | Tag | Get the Tag for this element. (Inherited from Element.)
Public property | TagName | Get or Set the name of the tag for this element. (Inherited from Element.)
Public property | Text | Get or Set the combined text of this element and all its children. (Inherited from Element.)
Public property | TextNodes | Get this element's child text nodes. (Inherited from Element.)
Public property | Val | Get or Set the value of a form element (input, textarea, etc). (Inherited from Element.)
Top
Remarks
It also allows a form to easily be submitted.
See Also

Reference


FormElement Methods

FormElement Methods

The FormElement type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>). (Inherited from Node.)
Public method | AddClass | Add a class name to this element's class attribute. (Inherited from Element.)
Public method | AddElement | Add a form control element to this form.
Public method | After(String) | Insert the specified HTML into the DOM after this element (as a following sibling). (Inherited from Element.)
Public method | After(Node) | Insert the specified node into the DOM after this node (as a following sibling). (Inherited from Element.)
Public method | Append | Add inner HTML to this element. (Inherited from Element.)
Public method | AppendChild | Add a node child node to this element. (Inherited from Element.)
Public method | AppendElement | Create a new element by tag name, and add it as the last child. (Inherited from Element.)
Public method | AppendText | Create and append a new TextNode to this element. (Inherited from Element.)
Public method | Attr(String) | Get an attribute's value by its key. (Inherited from Node.)
Public method | Attr(String, String) | Set an attribute (key=value). (Inherited from Node.)
Public method | Before(String) | Insert the specified HTML into the DOM before this element (as a preceding sibling). (Inherited from Element.)
Public method | Before(Node) | Insert the specified node into the DOM before this node (as a preceding sibling). (Inherited from Element.)
Public method | Child | Get a child element of this element, by its 0-based index number. (Inherited from Element.)
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | Empty | Remove all of the element's child nodes. (Inherited from Element.)
Public method | Equals | Compares two Element instances for equality. (Inherited from Element.)
Public method | GetAllElements | Find all elements under this element (including self, and children of children). (Inherited from Element.)
Public method | GetElementById | Find an element by ID, including or under this element. (Inherited from Element.)
Public method | GetElementsByAttribute | Find elements that have a named attribute set. (Inherited from Element.)
Public method | GetElementsByAttributeStarting | Find elements that have an attribute name starting with the supplied prefix. (Inherited from Element.)
Public method | GetElementsByAttributeValue | Find elements that have an attribute with the specific value. (Inherited from Element.)
Public method | GetElementsByAttributeValueContaining | Find elements that have attributes whose value contains the match string. (Inherited from Element.)
Public method | GetElementsByAttributeValueEnding | Find elements that have attributes that end with the value suffix. (Inherited from Element.)
Public method | GetElementsByAttributeValueMatching(String, String) | Find elements that have attributes whose values match the supplied regular expression. (Inherited from Element.)
Public method | GetElementsByAttributeValueMatching(String, Regex) | Find elements that have attributes whose values match the supplied regular expression. (Inherited from Element.)
Public method | GetElementsByAttributeValueNot | Find elements that either do not have this attribute, or have it with a different value. (Inherited from Element.)
Public method | GetElementsByAttributeValueStarting | Find elements that have attributes that start with the value prefix. (Inherited from Element.)
Public method | GetElementsByClass | Find elements that have this class, including or under this element. (Inherited from Element.)
Public method | GetElementsByIndexEquals | Find elements whose sibling index is equal to the supplied index. (Inherited from Element.)
Public method | GetElementsByIndexGreaterThan | Find elements whose sibling index is greater than the supplied index. (Inherited from Element.)
Public method | GetElementsByIndexLessThan | Find elements whose sibling index is less than the supplied index. (Inherited from Element.)
Public method | GetElementsByTag | Finds elements, including and recursively under this element, with the specified tag name. (Inherited from Element.)
Public method | GetElementsContainingOwnText | Find elements that directly contain the specified string. (Inherited from Element.)
Public method | GetElementsContainingText | Find elements that contain the specified string. (Inherited from Element.)
Public method | GetElementsMatchingOwnText(String) | Find elements whose text matches the supplied regular expression. (Inherited from Element.)
Public method | GetElementsMatchingOwnText(Regex) | Find elements whose own text matches the supplied regular expression. (Inherited from Element.)
Public method | GetElementsMatchingText(String) | Find elements whose text matches the supplied regular expression. (Inherited from Element.)
Public method | GetElementsMatchingText(Regex) | Find elements whose text matches the supplied regular expression. (Inherited from Element.)
Public method | GetHashCode | Returns the hash code for this instance. (Inherited from Element.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Inherited from Node.)
Public method | HasClass | Tests if this element has a class. (Inherited from Element.)
Public method | InsertChildren | Inserts the given child nodes into this element at the specified index. (Inherited from Element.)
Public method | Prepend | Add inner HTML into this element. (Inherited from Element.)
Public method | PrependChild | Add a node to the start of this element's children. (Inherited from Element.)
Public method | PrependElement | Create a new element by tag name, and add it as the first child. (Inherited from Element.)
Public method | PrependText | Create and prepend a new TextNode to this element. (Inherited from Element.)
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Inherited from Node.)
Public method | RemoveClass | Remove a class name from this element's class attribute. (Inherited from Element.)
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | Select | Find elements that match the Supremes.Select.Selector CSS query, with this element as the starting context. Matched elements may include this element, or any of its children. (Inherited from Element.)
Public method | SubmitAsync(HttpClient) | submit this form, using a specified HttpClient.
Public method | SubmitAsync(HttpClient, CancellationToken) | submit this form, using a specified HttpClient.
Public method | ToggleClass | Toggle a class name on this element's class attribute: if present, remove it; otherwise add it. (Inherited from Element.)
Public method | ToString | Converts the value of this instance to a string. (Inherited from Element.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this element. (Inherited from Element.)
Top
Extension Methods
 | Name | Description
Public Extension Method | ClassNames | Set all of the specified element's class names, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | Html | Set the specified element's inner HTML, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | TagName | Set the name of the tag for the specified element, and returns the element itself. (Defined by FluentUtility.)
Public Extension Method | Val | Set the value of the specified form element (input, textarea, etc), and returns the element itself. (Defined by FluentUtility.)
Top
See Also

Reference

FormElement Class


FormElement.AddElement Method

FormElementAddElement Method

Add a form control element to this form.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public FormElement AddElement(
    Element element
)
Public Function AddElement (
    element As Element
) As FormElement
member AddElement :
        element : Element -> FormElement

Parameters

element
Type: Supremes.NodesElement
form control to add

Return Value

Type: FormElement
this form element, for chaining
See Also

Reference

FormElement Class


FormElement.SubmitAsync Method

FormElementSubmitAsync Method

Overload List
 | Name | Description
Public method | SubmitAsync(HttpClient) | submit this form, using a specified HttpClient.
Public method | SubmitAsync(HttpClient, CancellationToken) | submit this form, using a specified HttpClient.
Top
See Also

Reference

FormElement Class


FormElement.SubmitAsync Method (HttpClient)

FormElementSubmitAsync Method (HttpClient)
version 0.2.0

[This is preliminary documentation and is subject to change.]

submit this form, using a specified HttpClient.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Task<HttpResponseMessage> SubmitAsync(
    HttpClient client
)
Public Function SubmitAsync (
    client As HttpClient
) As Task(Of HttpResponseMessage)
member SubmitAsync :
        client : HttpClient -> Task<HttpResponseMessage>

Parameters

client
Type: System.Net.HttpHttpClient

[Missing <param name="client"/> documentation for "M:Supremes.Nodes.FormElement.SubmitAsync(System.Net.Http.HttpClient)"]

Return Value

Type: Task HttpResponseMessage
an async task.
Exceptions
Exception | Condition
ArgumentException | if the form's absolute action URL cannot be determined. Make sure you pass the document's base URI when parsing.
Remarks
the request will be set up from the form values. You can set up other options (like user-agent, timeout, cookies) before executing.
See Also

Reference

FormElement Class
SubmitAsync Overload


FormElement.SubmitAsync Method (HttpClient, CancellationToken)

FormElementSubmitAsync Method (HttpClient, CancellationToken)
version 0.2.0

[This is preliminary documentation and is subject to change.]

submit this form, using a specified HttpClient.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Task<HttpResponseMessage> SubmitAsync(
    HttpClient client,
    CancellationToken cancellationToken
)
Public Function SubmitAsync (
    client As HttpClient,
    cancellationToken As CancellationToken
) As Task(Of HttpResponseMessage)
member SubmitAsync :
        client : HttpClient *
        cancellationToken : CancellationToken -> Task<HttpResponseMessage>

Parameters

client
Type: System.Net.HttpHttpClient

[Missing <param name="client"/> documentation for "M:Supremes.Nodes.FormElement.SubmitAsync(System.Net.Http.HttpClient,System.Threading.CancellationToken)"]

cancellationToken
Type: System.ThreadingCancellationToken

[Missing <param name="cancellationToken"/> documentation for "M:Supremes.Nodes.FormElement.SubmitAsync(System.Net.Http.HttpClient,System.Threading.CancellationToken)"]

Return Value

Type: Task HttpResponseMessage
an async task.
Exceptions
Exception | Condition
ArgumentException | if the form's absolute action URL cannot be determined. Make sure you pass the document's base URI when parsing.
Remarks
the request will be set up from the form values. You can set up other options (like user-agent, timeout, cookies) before executing.
See Also

Reference

FormElement Class
SubmitAsync Overload


FormElement Properties

FormElement Properties

The FormElement type exposes the following members.

Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Inherited from Node.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | Children | Get this element's child elements. (Inherited from Element.)
Public property | ClassName | Gets the literal value of this element's "class" attribute, which may include multiple class names, space separated. (Inherited from Element.)
Public property | ClassNames | Get or Set all of the element's class names. (Inherited from Element.)
Public property | CssSelector | Get a CSS selector that will uniquely select this element. (Inherited from Element.)
Public property | Data | Get the combined data of this element. (Inherited from Element.)
Public property | DataNodes | Get this element's child data nodes. (Inherited from Element.)
Public property | Dataset | Get this element's HTML5 custom data attributes. (Inherited from Element.)
Public property | Elements | Get the list of form control elements associated with this form.
Public property | ElementSiblingIndex | Get the list index of this element in its element sibling list. (Inherited from Element.)
Public property | FirstElementSibling | Gets the first element sibling of this element. (Inherited from Element.)
Public property | FormData | Get the data that this form submits.
Public property | HasText | Test if this element has any text content (that is not just whitespace). (Inherited from Element.)
Public property | Html | Get Or Set the element's inner HTML. (Inherited from Element.)
Public property | Id | Get the id attribute of this element. (Inherited from Element.)
Public property | IsBlock | Test if this element is a block-level element. (Inherited from Element.)
Public property | LastElementSibling | Gets the last element sibling of this element (Inherited from Element.)
Public property | NextElementSibling | Gets the next sibling element of this element. (Inherited from Element.)
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this node. (Inherited from Node.)
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | OwnText | Gets the text owned by this element only; does not get the combined text of all children. (Inherited from Element.)
Public property | Parent | Gets this element's parent element. (Inherited from Element.)
Public property | Parents | Get this element's parent and ancestors, up to the document root. (Inherited from Element.)
Public property | PreviousElementSibling | Gets the previous element sibling of this element. (Inherited from Element.)
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | SiblingElements | Get sibling elements. (Inherited from Element.)
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Public property | Tag | Get the Tag for this element. (Inherited from Element.)
Public property | TagName | Get or Set the name of the tag for this element. (Inherited from Element.)
Public property | Text | Get or Set the combined text of this element and all its children. (Inherited from Element.)
Public property | TextNodes | Get this element's child text nodes. (Inherited from Element.)
Public property | Val | Get or Set the value of a form element (input, textarea, etc). (Inherited from Element.)
Top
See Also

Reference

FormElement Class


FormElement.Elements Property

FormElementElements Property

Get the list of form control elements associated with this form.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Elements Elements { get; }
Public ReadOnly Property Elements As Elements
    Get
member Elements : Elements with get

Return Value

Type: Elements
form controls associated with this element.
See Also

Reference

FormElement Class


FormElement.FormData Property

FormElementFormData Property

Get the data that this form submits.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IList<KeyValuePair<string, string>> FormData { get; }
Public ReadOnly Property FormData As IList(Of KeyValuePair(Of String, String))
    Get
member FormData : IList<KeyValuePair<string, string>> with get

Return Value

Type: IList KeyValuePair String, String
a list of key vals
Remarks
The returned list is a copy of the data, and changes to the contents of the list will not be reflected in the DOM.
See Also

Reference

FormElement Class


Node Class

Node Class

The base, abstract Node model.
Inheritance Hierarchy
SystemObject
Supremes.NodesNode
Supremes.NodesComment
Supremes.NodesDataNode
Supremes.NodesElement
Supremes.NodesTextNode
Supremes.NodesXmlDeclaration

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public abstract class Node
Public MustInherit Class Node
[<AbstractClassAttribute>]
type Node =  class end

The Node type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>).
Public method | After(String) | Insert the specified HTML into the DOM after this node (i.e. as a following sibling).
Public method | After(Node) | Insert the specified node into the DOM after this node (i.e. as a following sibling).
Public method | Attr(String) | Get an attribute's value by its key.
Public method | Attr(String, String) | Set an attribute (key=value).
Public method | Before(String) | Insert the specified HTML into the DOM before this node (i.e. as a preceding sibling).
Public method | Before(Node) | Insert the specified node into the DOM before this node (i.e. as a preceding sibling).
Public method | ChildNode | Get a child node by its 0-based index.
Public method | ChildNodesCopy | Returns a deep copy of this node's children.
Public method | Equals | Compares two Node instances for equality. (Overrides ObjectEquals(Object).)
Protected method | Finalize | (Inherited from Object.)
Public method | GetHashCode | Returns the hash code for this instance. (Overrides ObjectGetHashCode.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute.
Protected method | MemberwiseClone | (Inherited from Object.)
Public method | Remove | Remove (delete) this node from the DOM tree.
Public method | RemoveAttr | Remove an attribute from this element.
Public method | ReplaceWith | Replace this node in the DOM with the supplied node.
Public method | ToString | Converts the value of this instance to a string. (Overrides ObjectToString.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent.
Public method | Wrap | Wrap the supplied HTML around this node.
Top
Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes.
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants.
Public property | ChildNodes | Get this node's children.
Public property | ChildNodeSize | Get the number of child nodes that this node holds.
Public property | NextSibling | Get this node's next sibling.
Public property | OuterHtml | Get the outer HTML of this node.
Public property | OwnerDocument | Gets the Document associated with this Node.
Public property | Parent | Gets this node's parent node.
Public property | PreviousSibling | Get this node's previous sibling.
Public property | SiblingIndex | Get the list index of this node in its node sibling list.
Public property | SiblingNodes | Retrieves this node's sibling nodes.
Top
Remarks
Elements, Documents, Comments etc are all Node instances.
See Also

Reference


Node Methods

Node Methods

The Node type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>).
Public method | After(String) | Insert the specified HTML into the DOM after this node (i.e. as a following sibling).
Public method | After(Node) | Insert the specified node into the DOM after this node (i.e. as a following sibling).
Public method | Attr(String) | Get an attribute's value by its key.
Public method | Attr(String, String) | Set an attribute (key=value).
Public method | Before(String) | Insert the specified HTML into the DOM before this node (i.e. as a preceding sibling).
Public method | Before(Node) | Insert the specified node into the DOM before this node (i.e. as a preceding sibling).
Public method | ChildNode | Get a child node by its 0-based index.
Public method | ChildNodesCopy | Returns a deep copy of this node's children.
Public method | Equals | Compares two Node instances for equality. (Overrides ObjectEquals(Object).)
Protected method | Finalize | (Inherited from Object.)
Public method | GetHashCode | Returns the hash code for this instance. (Overrides ObjectGetHashCode.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute.
Protected method | MemberwiseClone | (Inherited from Object.)
Public method | Remove | Remove (delete) this node from the DOM tree.
Public method | RemoveAttr | Remove an attribute from this element.
Public method | ReplaceWith | Replace this node in the DOM with the supplied node.
Public method | ToString | Converts the value of this instance to a string. (Overrides ObjectToString.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent.
Public method | Wrap | Wrap the supplied HTML around this node.
Top
See Also

Reference

Node Class


Node.AbsUrl Method

NodeAbsUrl Method

Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public virtual string AbsUrl(
    string attributeKey
)
Public Overridable Function AbsUrl (
    attributeKey As String
) As String
abstract AbsUrl :
        attributeKey : string -> string
override AbsUrl :
        attributeKey : string -> string

Parameters

attributeKey
Type: SystemString
The attribute key

Return Value

Type: String
An absolute URL if one could be made, or an empty string (not null) if the attribute was missing or could not be made successfully into a URL.
Remarks

E.g.: string absUrl = linkEl.AbsUrl("href");

If the attribute value is already absolute (i.e. it starts with a protocol, like http:// or https:// etc), and it successfully parses as a URL, the attribute is returned directly. Otherwise, it is treated as a URL relative to the element's BaseUri , and made absolute using that.

As an alternate, you can use the Attr(string) method with the abs: prefix, e.g.: string absUrl = linkEl.Attr("abs:href");

This method add trailing slash to domain name: i.e. from <a id=2 href='http://jsoup.org'> to "http://jsoup.org/"

See Also

Reference

Node Class
Supremes.Nodes Namespace
Attr(string)
System.Uri.TryCreate(string,UriKind,out Uri)


Node.After Method

NodeAfter Method

Overload List
 | Name | Description
Public method | After(String) | Insert the specified HTML into the DOM after this node (i.e. as a following sibling).
Public method | After(Node) | Insert the specified node into the DOM after this node (i.e. as a following sibling).
Top
See Also

Reference

Node Class


Node.After Method (String)

NodeAfter Method (String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Insert the specified HTML into the DOM after this node (i.e. as a following sibling).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public virtual Node After(
    string html
)
Public Overridable Function After (
    html As String
) As Node
abstract After :
        html : string -> Node
override After :
        html : string -> Node

Parameters

html
Type: SystemString
HTML to add after this node

Return Value

Type: Node
this node, for chaining
See Also

Reference

Node Class
After Overload
Supremes.Nodes Namespace
Before(string)


Node.After Method (Node)

NodeAfter Method (Node)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Insert the specified node into the DOM after this node (i.e. as a following sibling).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public virtual Node After(
    Node node
)
Public Overridable Function After (
    node As Node
) As Node
abstract After :
        node : Node -> Node
override After :
        node : Node -> Node

Parameters

node
Type: Supremes.NodesNode
to add after this node

Return Value

Type: Node
this node, for chaining
See Also

Reference

Node Class
After Overload
Supremes.Nodes Namespace
Before(Node)


Node.Attr Method

NodeAttr Method

Overload List
 | Name | Description
Public method | Attr(String) | Get an attribute's value by its key.
Public method | Attr(String, String) | Set an attribute (key=value).
Top
See Also

Reference

Node Class


Node.Attr Method (String)

NodeAttr Method (String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Get an attribute's value by its key.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public virtual string Attr(
    string attributeKey
)
Public Overridable Function Attr (
    attributeKey As String
) As String
abstract Attr :
        attributeKey : string -> string
override Attr :
        attributeKey : string -> string

Parameters

attributeKey
Type: SystemString
The attribute key.

Return Value

Type: String
The attribute, or empty string if not present (to avoid nulls).
Remarks
To get an absolute URL from an attribute that may be a relative URL, prefix the key with abs, which is a shortcut to the AbsUrl(string) method. E.g.:
String url = a.attr("abs:href");
See Also

Reference

Node Class
Attr Overload
Supremes.Nodes Namespace
Attributes
HasAttr(string)
AbsUrl(string)


Node.Attr Method (String, String)

NodeAttr Method (String, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set an attribute (key=value).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public virtual Node Attr(
    string attributeKey,
    string attributeValue
)
Public Overridable Function Attr (
    attributeKey As String,
    attributeValue As String
) As Node
abstract Attr :
        attributeKey : string *
        attributeValue : string -> Node
override Attr :
        attributeKey : string *
        attributeValue : string -> Node

Parameters

attributeKey
Type: SystemString
The attribute key.
attributeValue
Type: SystemString
The attribute value.

Return Value

Type: Node
this (for chaining)
Remarks
If the attribute already exists, it is replaced.
See Also

Reference

Node Class
Attr Overload


Node.Before Method

NodeBefore Method

Overload List
 | Name | Description
Public method | Before(String) | Insert the specified HTML into the DOM before this node (i.e. as a preceding sibling).
Public method | Before(Node) | Insert the specified node into the DOM before this node (i.e. as a preceding sibling).
Top
See Also

Reference

Node Class


Node.Before Method (String)

NodeBefore Method (String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Insert the specified HTML into the DOM before this node (i.e. as a preceding sibling).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public virtual Node Before(
    string html
)
Public Overridable Function Before (
    html As String
) As Node
abstract Before :
        html : string -> Node
override Before :
        html : string -> Node

Parameters

html
Type: SystemString
HTML to add before this node

Return Value

Type: Node
this node, for chaining
See Also

Reference

Node Class
Before Overload
Supremes.Nodes Namespace
After(string)


Node.Before Method (Node)

NodeBefore Method (Node)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Insert the specified node into the DOM before this node (i.e. as a preceding sibling).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public virtual Node Before(
    Node node
)
Public Overridable Function Before (
    node As Node
) As Node
abstract Before :
        node : Node -> Node
override Before :
        node : Node -> Node

Parameters

node
Type: Supremes.NodesNode
to add before this node

Return Value

Type: Node
this node, for chaining
See Also

Reference

Node Class
Before Overload
Supremes.Nodes Namespace
After(Node)


Node.ChildNode Method

NodeChildNode Method

Get a child node by its 0-based index.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Node ChildNode(
    int index
)
Public Function ChildNode (
    index As Integer
) As Node
member ChildNode :
        index : int -> Node

Parameters

index
Type: SystemInt32
index of child node

Return Value

Type: Node
the child node at this index. Throws a IndexOutOfBoundsException if the index is out of bounds.
See Also

Reference

Node Class


Node.ChildNodesCopy Method

NodeChildNodesCopy Method

Returns a deep copy of this node's children.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IList<Node> ChildNodesCopy()
Public Function ChildNodesCopy As IList(Of Node)
member ChildNodesCopy : unit -> IList<Node>

Return Value

Type: IList Node
a deep copy of this node's children
Remarks
Changes made to these nodes will not be reflected in the original nodes
See Also

Reference

Node Class


Node.Equals Method

NodeEquals Method

Compares two Node instances for equality.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override bool Equals(
    Object obj
)
Public Overrides Function Equals (
    obj As Object
) As Boolean
abstract Equals :
        obj : Object -> bool
override Equals :
        obj : Object -> bool

Parameters

obj
Type: SystemObject

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Supremes.Nodes.Node.Equals(System.Object)"]

See Also

Reference

Node Class


Node.GetHashCode Method

NodeGetHashCode Method

Returns the hash code for this instance.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override int GetHashCode()
Public Overrides Function GetHashCode As Integer
abstract GetHashCode : unit -> int
override GetHashCode : unit -> int

Return Value

Type: Int32

[Missing <returns> documentation for "M:Supremes.Nodes.Node.GetHashCode"]

See Also

Reference

Node Class


Node.HasAttr Method

NodeHasAttr Method

Test if this element has an attribute.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public virtual bool HasAttr(
    string attributeKey
)
Public Overridable Function HasAttr (
    attributeKey As String
) As Boolean
abstract HasAttr :
        attributeKey : string -> bool
override HasAttr :
        attributeKey : string -> bool

Parameters

attributeKey
Type: SystemString
The attribute key to check.

Return Value

Type: Boolean
true if the attribute exists, false if not.
See Also

Reference

Node Class


Node.Remove Method

NodeRemove Method

Remove (delete) this node from the DOM tree.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public void Remove()
Public Sub Remove
member Remove : unit -> unit
Remarks
If this node has children, they are also removed.
See Also

Reference

Node Class


Node.RemoveAttr Method

NodeRemoveAttr Method

Remove an attribute from this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public virtual Node RemoveAttr(
    string attributeKey
)
Public Overridable Function RemoveAttr (
    attributeKey As String
) As Node
abstract RemoveAttr :
        attributeKey : string -> Node
override RemoveAttr :
        attributeKey : string -> Node

Parameters

attributeKey
Type: SystemString
The attribute to remove.

Return Value

Type: Node
this (for chaining)
See Also

Reference

Node Class


Node.ReplaceWith Method

NodeReplaceWith Method

Replace this node in the DOM with the supplied node.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public void ReplaceWith(
    Node in
)
Public Sub ReplaceWith (
    in As Node
)
member ReplaceWith :
        in : Node -> unit

Parameters

in
Type: Supremes.NodesNode
the node that will will replace the existing node.
See Also

Reference

Node Class


Node.ToString Method

NodeToString Method

Converts the value of this instance to a string.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string ToString()
Public Overrides Function ToString As String
abstract ToString : unit -> string
override ToString : unit -> string

Return Value

Type: String

[Missing <returns> documentation for "M:Supremes.Nodes.Node.ToString"]

See Also

Reference

Node Class


Node.Unwrap Method

NodeUnwrap Method

Removes this node from the DOM, and moves its children up into the node's parent.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Node Unwrap()
Public Function Unwrap As Node
member Unwrap : unit -> Node

Return Value

Type: Node
the first child of this node, after the node has been unwrapped. Null if the node had no children.
Remarks
This has the effect of dropping the node but keeping its children.

For example, with the input html:
<div>One <span>Two <b>Three</b></span></div>
Calling element.Unwrap() on the span element will result in the html:
<div>One Two <b>Three</b></div>
and the "Two " TextNode being returned.

See Also

Reference

Node Class
Supremes.Nodes Namespace
Remove()
Wrap(string)


Node.Wrap Method

NodeWrap Method

Wrap the supplied HTML around this node.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Node Wrap(
    string html
)
Public Function Wrap (
    html As String
) As Node
member Wrap :
        html : string -> Node

Parameters

html
Type: SystemString
HTML to wrap around this element, e.g. <div class="head"></div> . Can be arbitrarily deep.

Return Value

Type: Node
this node, for chaining.
See Also

Reference

Node Class


Node Properties

Node Properties

The Node type exposes the following members.

Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes.
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants.
Public property | ChildNodes | Get this node's children.
Public property | ChildNodeSize | Get the number of child nodes that this node holds.
Public property | NextSibling | Get this node's next sibling.
Public property | OuterHtml | Get the outer HTML of this node.
Public property | OwnerDocument | Gets the Document associated with this Node.
Public property | Parent | Gets this node's parent node.
Public property | PreviousSibling | Get this node's previous sibling.
Public property | SiblingIndex | Get the list index of this node in its node sibling list.
Public property | SiblingNodes | Retrieves this node's sibling nodes.
Top
See Also

Reference

Node Class


Node.Attributes Property

NodeAttributes Property

Get all of the element's attributes.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public virtual Attributes Attributes { get; }
Public Overridable ReadOnly Property Attributes As Attributes
    Get
abstract Attributes : Attributes with get
override Attributes : Attributes with get

Return Value

Type: Attributes
attributes (which implements iterable, in same order as presented in original HTML).
See Also

Reference

Node Class


Node.BaseUri Property

NodeBaseUri Property

Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string BaseUri { get; set; }
Public Property BaseUri As String
    Get
    Set
member BaseUri : string with get, set

Property Value

Type: String
base URI to set

Return Value

Type: String
base URI
See Also

Reference

Node Class


Node.ChildNodes Property

NodeChildNodes Property

Get this node's children.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IReadOnlyList<Node> ChildNodes { get; }
Public ReadOnly Property ChildNodes As IReadOnlyList(Of Node)
    Get
member ChildNodes : IReadOnlyList<Node> with get

Return Value

Type: IReadOnlyList Node
list of children. If no children, returns an empty list.
Remarks
Presented as an unmodifiable list: new children can not be added, but the child nodes themselves can be manipulated.
See Also

Reference

Node Class


Node.ChildNodeSize Property

NodeChildNodeSize Property

Get the number of child nodes that this node holds.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public int ChildNodeSize { get; }
Public ReadOnly Property ChildNodeSize As Integer
    Get
member ChildNodeSize : int with get

Return Value

Type: Int32
the number of child nodes that this node holds.
See Also

Reference

Node Class


Node.NextSibling Property

NodeNextSibling Property

Get this node's next sibling.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Node NextSibling { get; }
Public ReadOnly Property NextSibling As Node
    Get
member NextSibling : Node with get

Return Value

Type: Node
next sibling, or null if this is the last sibling
See Also

Reference

Node Class


Node.OuterHtml Property

NodeOuterHtml Property

Get the outer HTML of this node.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public virtual string OuterHtml { get; }
Public Overridable ReadOnly Property OuterHtml As String
    Get
abstract OuterHtml : string with get
override OuterHtml : string with get

Return Value

Type: String
HTML
See Also

Reference

Node Class


Node.OwnerDocument Property

NodeOwnerDocument Property

Gets the Document associated with this Node.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Document OwnerDocument { get; }
Public ReadOnly Property OwnerDocument As Document
    Get
member OwnerDocument : Document with get

Return Value

Type: Document
the Document associated with this Node, or null if there is no such Document.
See Also

Reference

Node Class


Node.Parent Property

NodeParent Property

Gets this node's parent node.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Node Parent { get; }
Public ReadOnly Property Parent As Node
    Get
member Parent : Node with get

Return Value

Type: Node
parent node; or null if no parent.
See Also

Reference

Node Class


Node.PreviousSibling Property

NodePreviousSibling Property

Get this node's previous sibling.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Node PreviousSibling { get; }
Public ReadOnly Property PreviousSibling As Node
    Get
member PreviousSibling : Node with get

Return Value

Type: Node
the previous sibling, or null if this is the first sibling
See Also

Reference

Node Class


Node.SiblingIndex Property

NodeSiblingIndex Property

Get the list index of this node in its node sibling list.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public int SiblingIndex { get; }
Public ReadOnly Property SiblingIndex As Integer
    Get
member SiblingIndex : int with get

Return Value

Type: Int32
position in node sibling list
Remarks
I.e. if this is the first node sibling, returns 0.
See Also

Reference

Node Class
Element.ElementSiblingIndex


Node.SiblingNodes Property

NodeSiblingNodes Property

Retrieves this node's sibling nodes.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IReadOnlyList<Node> SiblingNodes { get; }
Public ReadOnly Property SiblingNodes As IReadOnlyList(Of Node)
    Get
member SiblingNodes : IReadOnlyList<Node> with get

Return Value

Type: IReadOnlyList Node
node siblings. If the node has no parent, returns an empty list.
Remarks
Similar to node.parent.ChildNodes , but does not include this node (a node is not a sibling of itself).
See Also

Reference

Node Class


Tag Class

Tag Class

HTML Tag capabilities.
Inheritance Hierarchy
SystemObject
Supremes.NodesTag

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class Tag
Public NotInheritable Class Tag
[<SealedAttribute>]
type Tag =  class end

The Tag type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Compares two Tag instances for equality. (Overrides ObjectEquals(Object).)
Public method | GetHashCode | Returns the hash code for this instance. (Overrides ObjectGetHashCode.)
Public method | GetType | (Inherited from Object.)
 | IsKnownTag | Check if this tagname is a known tag.
Public method | ToString | Converts the value of this instance to a string. (Overrides ObjectToString.)
 | ValueOf | Get a Tag by name.
Top
Properties
 | Name | Description
Public property | CanContainBlock | Gets if this tag can contain block tags.
Public property | IsBlock | Gets if this is a block tag.
Public property | IsData | Gets if this tag is a data only tag.
Public property | IsEmpty | Get if this is an empty tag
Public property | IsFormattedAsBlock | Gets if this tag should be formatted as a block (or as inline)
Public property | IsFormListed | Get if this tag represents a control associated with a form.
Public property | IsFormSubmittable | Get if this tag represents an element that should be submitted with a form.
Public property | IsInline | Gets if this tag is an inline tag.
Public property | IsKnown | Get if this is a pre-defined tag, or was auto created on parsing.
Public property | IsSelfClosing | Get if this tag is self closing.
Public property | Name | Get this tag's name.
Public property | PreservesWhitespace | Get if this tag should preserve whitespace within child text nodes.
Top
See Also

Reference


Tag Methods

Tag Methods

The Tag type exposes the following members.

Methods
 | Name | Description
Public method | Equals | Compares two Tag instances for equality. (Overrides ObjectEquals(Object).)
Public method | GetHashCode | Returns the hash code for this instance. (Overrides ObjectGetHashCode.)
Public method | GetType | (Inherited from Object.)
 | IsKnownTag | Check if this tagname is a known tag.
Public method | ToString | Converts the value of this instance to a string. (Overrides ObjectToString.)
 | ValueOf | Get a Tag by name.
Top
See Also

Reference

Tag Class


Tag.Equals Method

TagEquals Method

Compares two Tag instances for equality.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override bool Equals(
    Object obj
)
Public Overrides Function Equals (
    obj As Object
) As Boolean
abstract Equals :
        obj : Object -> bool
override Equals :
        obj : Object -> bool

Parameters

obj
Type: SystemObject

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Supremes.Nodes.Tag.Equals(System.Object)"]

See Also

Reference

Tag Class


Tag.GetHashCode Method

TagGetHashCode Method

Returns the hash code for this instance.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override int GetHashCode()
Public Overrides Function GetHashCode As Integer
abstract GetHashCode : unit -> int
override GetHashCode : unit -> int

Return Value

Type: Int32

[Missing <returns> documentation for "M:Supremes.Nodes.Tag.GetHashCode"]

See Also

Reference

Tag Class


Tag.IsKnownTag Method

TagIsKnownTag Method

Check if this tagname is a known tag.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static bool IsKnownTag(
    string tagName
)
Public Shared Function IsKnownTag (
    tagName As String
) As Boolean
static member IsKnownTag :
        tagName : string -> bool

Parameters

tagName
Type: SystemString
name of tag

Return Value

Type: Boolean
if known HTML tag
See Also

Reference

Tag Class


Tag.ToString Method

TagToString Method

Converts the value of this instance to a string.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string ToString()
Public Overrides Function ToString As String
abstract ToString : unit -> string
override ToString : unit -> string

Return Value

Type: String

[Missing <returns> documentation for "M:Supremes.Nodes.Tag.ToString"]

See Also

Reference

Tag Class


Tag.ValueOf Method

TagValueOf Method

Get a Tag by name.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Tag ValueOf(
    string tagName
)
Public Shared Function ValueOf (
    tagName As String
) As Tag
static member ValueOf :
        tagName : string -> Tag

Parameters

tagName
Type: SystemString
Name of tag, e.g. "p". Case insensitive.

Return Value

Type: Tag
The tag, either defined or new generic.
Remarks
If not previously defined (unknown), returns a new generic tag, that can do anything.

Pre-defined tags (P, DIV etc) will be ==, but unknown tags are not registered and will only .equals().

See Also

Reference

Tag Class


Tag Properties

Tag Properties

The Tag type exposes the following members.

Properties
 | Name | Description
Public property | CanContainBlock | Gets if this tag can contain block tags.
Public property | IsBlock | Gets if this is a block tag.
Public property | IsData | Gets if this tag is a data only tag.
Public property | IsEmpty | Get if this is an empty tag
Public property | IsFormattedAsBlock | Gets if this tag should be formatted as a block (or as inline)
Public property | IsFormListed | Get if this tag represents a control associated with a form.
Public property | IsFormSubmittable | Get if this tag represents an element that should be submitted with a form.
Public property | IsInline | Gets if this tag is an inline tag.
Public property | IsKnown | Get if this is a pre-defined tag, or was auto created on parsing.
Public property | IsSelfClosing | Get if this tag is self closing.
Public property | Name | Get this tag's name.
Public property | PreservesWhitespace | Get if this tag should preserve whitespace within child text nodes.
Top
See Also

Reference

Tag Class


Tag.CanContainBlock Property

TagCanContainBlock Property

Gets if this tag can contain block tags.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool CanContainBlock { get; }
Public ReadOnly Property CanContainBlock As Boolean
    Get
member CanContainBlock : bool with get

Return Value

Type: Boolean
if tag can contain block tags
See Also

Reference

Tag Class


Tag.IsBlock Property

TagIsBlock Property

Gets if this is a block tag.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool IsBlock { get; }
Public ReadOnly Property IsBlock As Boolean
    Get
member IsBlock : bool with get

Return Value

Type: Boolean
if block tag
See Also

Reference

Tag Class


Tag.IsData Property

TagIsData Property

Gets if this tag is a data only tag.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool IsData { get; }
Public ReadOnly Property IsData As Boolean
    Get
member IsData : bool with get

Return Value

Type: Boolean
if this tag is a data only tag
See Also

Reference

Tag Class


Tag.IsEmpty Property

TagIsEmpty Property

Get if this is an empty tag

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool IsEmpty { get; }
Public ReadOnly Property IsEmpty As Boolean
    Get
member IsEmpty : bool with get

Return Value

Type: Boolean
if this is an empty tag
See Also

Reference

Tag Class


Tag.IsFormattedAsBlock Property

TagIsFormattedAsBlock Property

Gets if this tag should be formatted as a block (or as inline)

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool IsFormattedAsBlock { get; }
Public ReadOnly Property IsFormattedAsBlock As Boolean
    Get
member IsFormattedAsBlock : bool with get

Return Value

Type: Boolean
if should be formatted as block or inline
See Also

Reference

Tag Class


Tag.IsFormListed Property

TagIsFormListed Property

Get if this tag represents a control associated with a form.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool IsFormListed { get; }
Public ReadOnly Property IsFormListed As Boolean
    Get
member IsFormListed : bool with get

Return Value

Type: Boolean
if associated with a form
Remarks
E.g. input, textarea, output
See Also

Reference

Tag Class


Tag.IsFormSubmittable Property

TagIsFormSubmittable Property

Get if this tag represents an element that should be submitted with a form.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool IsFormSubmittable { get; }
Public ReadOnly Property IsFormSubmittable As Boolean
    Get
member IsFormSubmittable : bool with get

Return Value

Type: Boolean
if submittable with a form
Remarks
E.g. input, option
See Also

Reference

Tag Class


Tag.IsInline Property

TagIsInline Property

Gets if this tag is an inline tag.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool IsInline { get; }
Public ReadOnly Property IsInline As Boolean
    Get
member IsInline : bool with get

Return Value

Type: Boolean
if this tag is an inline tag.
See Also

Reference

Tag Class


Tag.IsKnown Property

TagIsKnown Property

Get if this is a pre-defined tag, or was auto created on parsing.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool IsKnown { get; }
Public ReadOnly Property IsKnown As Boolean
    Get
member IsKnown : bool with get

Return Value

Type: Boolean
if a known tag
See Also

Reference

Tag Class


Tag.IsSelfClosing Property

TagIsSelfClosing Property

Get if this tag is self closing.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool IsSelfClosing { get; }
Public ReadOnly Property IsSelfClosing As Boolean
    Get
member IsSelfClosing : bool with get

Return Value

Type: Boolean
if this tag should be output as self closing.
See Also

Reference

Tag Class


Tag.Name Property

TagName Property

Get this tag's name.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Name { get; }
Public ReadOnly Property Name As String
    Get
member Name : string with get

Return Value

Type: String
the tag's name
See Also

Reference

Tag Class


Tag.PreservesWhitespace Property

TagPreservesWhitespace Property

Get if this tag should preserve whitespace within child text nodes.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool PreservesWhitespace { get; }
Public ReadOnly Property PreservesWhitespace As Boolean
    Get
member PreservesWhitespace : bool with get

Return Value

Type: Boolean
if preserve whitepace
See Also

Reference

Tag Class


TextNode Class

TextNode Class

A text node.
Inheritance Hierarchy
SystemObject
Supremes.NodesNode
Supremes.NodesTextNode

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class TextNode : Node
Public NotInheritable Class TextNode
    Inherits Node
[<SealedAttribute>]
type TextNode =
    class
        inherit Node
    end

The TextNode type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative. (Overrides NodeAbsUrl(String).)
Public method | After(String) | Insert the specified HTML into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | After(Node) | Insert the specified node into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | Attr(String) | Get an attribute's value by its key. (Overrides NodeAttr(String).)
Public method | Attr(String, String) | Set an attribute (key=value). (Overrides NodeAttr(String, String).)
Public method | Before(String) | Insert the specified HTML into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | Before(Node) | Insert the specified node into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | Equals | Compares two Node instances for equality. (Inherited from Node.)
Public method | GetHashCode | Returns the hash code for this instance. (Inherited from Node.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Overrides NodeHasAttr(String).)
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Overrides NodeRemoveAttr(String).)
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | ToString | Converts the value of this instance to a string. (Overrides NodeToString.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this node. (Inherited from Node.)
Top
Extension Methods
 | Name | Description
Public Extension Method | Text | Set text content of the specified text node, and returns the text node itself. (Defined by FluentUtility.)
Top
Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Overrides NodeAttributes.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | IsBlank | Test if this text node is blank -- that is, empty or only whitespace (including newlines).
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this node. (Inherited from Node.)
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | Parent | Gets this node's parent node. (Inherited from Node.)
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Public property | Text | Get or Set text content of this text node.
Public property | WholeText | Get the (unencoded) text of this text node, including any newlines and spaces present in the original.
Top
See Also

Reference


TextNode Methods

TextNode Methods

The TextNode type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative. (Overrides NodeAbsUrl(String).)
Public method | After(String) | Insert the specified HTML into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | After(Node) | Insert the specified node into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | Attr(String) | Get an attribute's value by its key. (Overrides NodeAttr(String).)
Public method | Attr(String, String) | Set an attribute (key=value). (Overrides NodeAttr(String, String).)
Public method | Before(String) | Insert the specified HTML into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | Before(Node) | Insert the specified node into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | Equals | Compares two Node instances for equality. (Inherited from Node.)
Public method | GetHashCode | Returns the hash code for this instance. (Inherited from Node.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Overrides NodeHasAttr(String).)
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Overrides NodeRemoveAttr(String).)
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | ToString | Converts the value of this instance to a string. (Overrides NodeToString.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this node. (Inherited from Node.)
Top
Extension Methods
 | Name | Description
Public Extension Method | Text | Set text content of the specified text node, and returns the text node itself. (Defined by FluentUtility.)
Top
See Also

Reference

TextNode Class


TextNode.AbsUrl Method

TextNodeAbsUrl Method

Get an absolute URL from a URL attribute that may be relative.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string AbsUrl(
    string attributeKey
)
Public Overrides Function AbsUrl (
    attributeKey As String
) As String
abstract AbsUrl :
        attributeKey : string -> string
override AbsUrl :
        attributeKey : string -> string

Parameters

attributeKey
Type: SystemString
The attribute key

Return Value

Type: String

[Missing <returns> documentation for "M:Supremes.Nodes.TextNode.AbsUrl(System.String)"]

See Also

Reference

TextNode Class


TextNode.Attr Method

TextNodeAttr Method

Overload List
 | Name | Description
Public method | Attr(String) | Get an attribute's value by its key. (Overrides NodeAttr(String).)
Public method | Attr(String, String) | Set an attribute (key=value). (Overrides NodeAttr(String, String).)
Top
See Also

Reference

TextNode Class


TextNode.Attr Method (String)

TextNodeAttr Method (String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Get an attribute's value by its key.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string Attr(
    string attributeKey
)
Public Overrides Function Attr (
    attributeKey As String
) As String
abstract Attr :
        attributeKey : string -> string
override Attr :
        attributeKey : string -> string

Parameters

attributeKey
Type: SystemString

[Missing <param name="attributeKey"/> documentation for "M:Supremes.Nodes.TextNode.Attr(System.String)"]

Return Value

Type: String

[Missing <returns> documentation for "M:Supremes.Nodes.TextNode.Attr(System.String)"]

See Also

Reference

TextNode Class
Attr Overload


TextNode.Attr Method (String, String)

TextNodeAttr Method (String, String)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Set an attribute (key=value).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override Node Attr(
    string attributeKey,
    string attributeValue
)
Public Overrides Function Attr (
    attributeKey As String,
    attributeValue As String
) As Node
abstract Attr :
        attributeKey : string *
        attributeValue : string -> Node
override Attr :
        attributeKey : string *
        attributeValue : string -> Node

Parameters

attributeKey
Type: SystemString

[Missing <param name="attributeKey"/> documentation for "M:Supremes.Nodes.TextNode.Attr(System.String,System.String)"]

attributeValue
Type: SystemString

[Missing <param name="attributeValue"/> documentation for "M:Supremes.Nodes.TextNode.Attr(System.String,System.String)"]

Return Value

Type: Node

[Missing <returns> documentation for "M:Supremes.Nodes.TextNode.Attr(System.String,System.String)"]

See Also

Reference

TextNode Class
Attr Overload


TextNode.HasAttr Method

TextNodeHasAttr Method

Test if this element has an attribute.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override bool HasAttr(
    string attributeKey
)
Public Overrides Function HasAttr (
    attributeKey As String
) As Boolean
abstract HasAttr :
        attributeKey : string -> bool
override HasAttr :
        attributeKey : string -> bool

Parameters

attributeKey
Type: SystemString

[Missing <param name="attributeKey"/> documentation for "M:Supremes.Nodes.TextNode.HasAttr(System.String)"]

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Supremes.Nodes.TextNode.HasAttr(System.String)"]

See Also

Reference

TextNode Class


TextNode.RemoveAttr Method

TextNodeRemoveAttr Method

Remove an attribute from this element.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override Node RemoveAttr(
    string attributeKey
)
Public Overrides Function RemoveAttr (
    attributeKey As String
) As Node
abstract RemoveAttr :
        attributeKey : string -> Node
override RemoveAttr :
        attributeKey : string -> Node

Parameters

attributeKey
Type: SystemString

[Missing <param name="attributeKey"/> documentation for "M:Supremes.Nodes.TextNode.RemoveAttr(System.String)"]

Return Value

Type: Node

[Missing <returns> documentation for "M:Supremes.Nodes.TextNode.RemoveAttr(System.String)"]

See Also

Reference

TextNode Class


TextNode.ToString Method

TextNodeToString Method

Converts the value of this instance to a string.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string ToString()
Public Overrides Function ToString As String
abstract ToString : unit -> string
override ToString : unit -> string

Return Value

Type: String

[Missing <returns> documentation for "M:Supremes.Nodes.TextNode.ToString"]

See Also

Reference

TextNode Class


TextNode Properties

TextNode Properties

The TextNode type exposes the following members.

Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Overrides NodeAttributes.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | IsBlank | Test if this text node is blank -- that is, empty or only whitespace (including newlines).
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this node. (Inherited from Node.)
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | Parent | Gets this node's parent node. (Inherited from Node.)
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Public property | Text | Get or Set text content of this text node.
Public property | WholeText | Get the (unencoded) text of this text node, including any newlines and spaces present in the original.
Top
See Also

Reference

TextNode Class


TextNode.Attributes Property

TextNodeAttributes Property

Get all of the element's attributes.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override Attributes Attributes { get; }
Public Overrides ReadOnly Property Attributes As Attributes
    Get
abstract Attributes : Attributes with get
override Attributes : Attributes with get

Return Value

Type: Attributes
See Also

Reference

TextNode Class


TextNode.IsBlank Property

TextNodeIsBlank Property

Test if this text node is blank -- that is, empty or only whitespace (including newlines).

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool IsBlank { get; }
Public ReadOnly Property IsBlank As Boolean
    Get
member IsBlank : bool with get

Return Value

Type: Boolean
true if this document is empty or only whitespace, false if it contains any text content.
See Also

Reference

TextNode Class


TextNode.Text Property

TextNodeText Property

Get or Set text content of this text node.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string Text { get; set; }
Public Property Text As String
    Get
    Set
member Text : string with get, set

Property Value

Type: String
unencoded text

Return Value

Type: String
Unencoded, normalised text.
Remarks

if you want to use fluent API, write using Supremes.Fluent;.

See Also

Reference

TextNode Class
Supremes.Nodes Namespace
TextNode.WholeText
Supremes.Fluent.FluentUtility


TextNode.WholeText Property

TextNodeWholeText Property

Get the (unencoded) text of this text node, including any newlines and spaces present in the original.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string WholeText { get; }
Public ReadOnly Property WholeText As String
    Get
member WholeText : string with get

Return Value

Type: String
text
See Also

Reference

TextNode Class


XmlDeclaration Class

XmlDeclaration Class

An XML Declaration.
Inheritance Hierarchy
SystemObject
Supremes.NodesNode
Supremes.NodesXmlDeclaration

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class XmlDeclaration : Node
Public NotInheritable Class XmlDeclaration
    Inherits Node
[<SealedAttribute>]
type XmlDeclaration =
    class
        inherit Node
    end

The XmlDeclaration type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>). (Inherited from Node.)
Public method | After(String) | Insert the specified HTML into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | After(Node) | Insert the specified node into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | Attr(String) | Get an attribute's value by its key. (Inherited from Node.)
Public method | Attr(String, String) | Set an attribute (key=value). (Inherited from Node.)
Public method | Before(String) | Insert the specified HTML into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | Before(Node) | Insert the specified node into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | Equals | Compares two Node instances for equality. (Inherited from Node.)
Public method | GetHashCode | Returns the hash code for this instance. (Inherited from Node.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Inherited from Node.)
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Inherited from Node.)
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | ToString | Converts the value of this instance to a string. (Overrides NodeToString.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this node. (Inherited from Node.)
Top
Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Inherited from Node.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this node. (Inherited from Node.)
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | Parent | Gets this node's parent node. (Inherited from Node.)
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Public property | WholeDeclaration | Get the unencoded XML declaration.
Top
See Also

Reference


XmlDeclaration Methods

XmlDeclaration Methods

The XmlDeclaration type exposes the following members.

Methods
 | Name | Description
Public method | AbsUrl | Get an absolute URL from a URL attribute that may be relative (i.e. an <a href> or <img src>). (Inherited from Node.)
Public method | After(String) | Insert the specified HTML into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | After(Node) | Insert the specified node into the DOM after this node (i.e. as a following sibling). (Inherited from Node.)
Public method | Attr(String) | Get an attribute's value by its key. (Inherited from Node.)
Public method | Attr(String, String) | Set an attribute (key=value). (Inherited from Node.)
Public method | Before(String) | Insert the specified HTML into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | Before(Node) | Insert the specified node into the DOM before this node (i.e. as a preceding sibling). (Inherited from Node.)
Public method | ChildNode | Get a child node by its 0-based index. (Inherited from Node.)
Public method | ChildNodesCopy | Returns a deep copy of this node's children. (Inherited from Node.)
Public method | Equals | Compares two Node instances for equality. (Inherited from Node.)
Public method | GetHashCode | Returns the hash code for this instance. (Inherited from Node.)
Public method | GetType | (Inherited from Object.)
Public method | HasAttr | Test if this element has an attribute. (Inherited from Node.)
Public method | Remove | Remove (delete) this node from the DOM tree. (Inherited from Node.)
Public method | RemoveAttr | Remove an attribute from this element. (Inherited from Node.)
Public method | ReplaceWith | Replace this node in the DOM with the supplied node. (Inherited from Node.)
Public method | ToString | Converts the value of this instance to a string. (Overrides NodeToString.)
Public method | Unwrap | Removes this node from the DOM, and moves its children up into the node's parent. (Inherited from Node.)
Public method | Wrap | Wrap the supplied HTML around this node. (Inherited from Node.)
Top
See Also

Reference

XmlDeclaration Class


XmlDeclaration.ToString Method

XmlDeclarationToString Method

Converts the value of this instance to a string.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string ToString()
Public Overrides Function ToString As String
abstract ToString : unit -> string
override ToString : unit -> string

Return Value

Type: String

[Missing <returns> documentation for "M:Supremes.Nodes.XmlDeclaration.ToString"]

See Also

Reference

XmlDeclaration Class


XmlDeclaration Properties

XmlDeclaration Properties

The XmlDeclaration type exposes the following members.

Properties
 | Name | Description
Public property | Attributes | Get all of the element's attributes. (Inherited from Node.)
Public property | BaseUri | Get or Set the base URI of this node. When set, it updates the base URI of this node and all of its descendants. (Inherited from Node.)
Public property | ChildNodes | Get this node's children. (Inherited from Node.)
Public property | ChildNodeSize | Get the number of child nodes that this node holds. (Inherited from Node.)
Public property | NextSibling | Get this node's next sibling. (Inherited from Node.)
Public property | OuterHtml | Get the outer HTML of this node. (Inherited from Node.)
Public property | OwnerDocument | Gets the Document associated with this Node. (Inherited from Node.)
Public property | Parent | Gets this node's parent node. (Inherited from Node.)
Public property | PreviousSibling | Get this node's previous sibling. (Inherited from Node.)
Public property | SiblingIndex | Get the list index of this node in its node sibling list. (Inherited from Node.)
Public property | SiblingNodes | Retrieves this node's sibling nodes. (Inherited from Node.)
Public property | WholeDeclaration | Get the unencoded XML declaration.
Top
See Also

Reference

XmlDeclaration Class


XmlDeclaration.WholeDeclaration Property

XmlDeclarationWholeDeclaration Property

Get the unencoded XML declaration.

Namespace: Supremes.Nodes
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string WholeDeclaration { get; }
Public ReadOnly Property WholeDeclaration As String
    Get
member WholeDeclaration : string with get

Return Value

Type: String
XML declaration
See Also

Reference

XmlDeclaration Class


Supremes.Parsers Namespace

Supremes.Parsers Namespace

Classes
 | Class | Description
Public class | ParseError | A Parse Error records an error in the input HTML that occurs in either the tokenisation or the tree building phase.
Public class | Parser | Parses HTML into a Supremes.Nodes.Document . Generally best to use one of the more convenient parse methods in Supremes.Dcsoup .


ParseError Class

ParseError Class

A Parse Error records an error in the input HTML that occurs in either the tokenisation or the tree building phase.
Inheritance Hierarchy
SystemObject
Supremes.ParsersParseError

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class ParseError
Public NotInheritable Class ParseError
[<SealedAttribute>]
type ParseError =  class end

The ParseError type exposes the following members.

Methods
 | Name | Description
Public method | Equals | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Public method | ToString | Converts the value of this instance to a string. (Overrides ObjectToString.)
Top
Properties
 | Name | Description
Public property | ErrorMessage | Retrieve the error message.
Public property | Position | Retrieves the offset of the error.
Top
See Also

Reference

Supremes.Parsers Namespace


ParseError Methods

ParseError Methods

The ParseError type exposes the following members.

Methods
 | Name | Description
Public method | Equals | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Public method | ToString | Converts the value of this instance to a string. (Overrides ObjectToString.)
Top
See Also

Reference

ParseError Class
Supremes.Parsers Namespace


ParseError.ToString Method

ParseErrorToString Method

Converts the value of this instance to a string.

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public override string ToString()
Public Overrides Function ToString As String
abstract ToString : unit -> string
override ToString : unit -> string

Return Value

Type: String

[Missing <returns> documentation for "M:Supremes.Parsers.ParseError.ToString"]

See Also

Reference

ParseError Class
Supremes.Parsers Namespace


ParseError Properties

ParseError Properties

The ParseError type exposes the following members.

Properties
 | Name | Description
Public property | ErrorMessage | Retrieve the error message.
Public property | Position | Retrieves the offset of the error.
Top
See Also

Reference

ParseError Class
Supremes.Parsers Namespace


ParseError.ErrorMessage Property

ParseErrorErrorMessage Property

Retrieve the error message.

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public string ErrorMessage { get; }
Public ReadOnly Property ErrorMessage As String
    Get
member ErrorMessage : string with get

Return Value

Type: String
the error message.
See Also

Reference

ParseError Class
Supremes.Parsers Namespace


ParseError.Position Property

ParseErrorPosition Property

Retrieves the offset of the error.

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public int Position { get; }
Public ReadOnly Property Position As Integer
    Get
member Position : int with get

Return Value

Type: Int32
error offset within input
See Also

Reference

ParseError Class
Supremes.Parsers Namespace


Parser Class

Parser Class

Parses HTML into a Supremes.Nodes.Document . Generally best to use one of the more convenient parse methods in Supremes.Dcsoup .
Inheritance Hierarchy
SystemObject
Supremes.ParsersParser

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public class Parser
Public Class Parser
type Parser =  class end

The Parser type exposes the following members.

Methods
 | Name | Description
Public method | Equals | (Inherited from Object.)
Protected method | Finalize | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Protected method | MemberwiseClone | (Inherited from Object.)
 | Parse | Parse HTML into a Document.
 | ParseBodyFragment | Parse a fragment of HTML into the body of a Document.
 | ParseFragment | Parse a fragment of HTML into a list of nodes.
Public method | ParseInput | Parse HTML into a Document
 | ParseXmlFragment | Parse a fragment of XML into a list of nodes.
Public method | SetTrackErrors | Enable or disable parse error tracking for the next parse.
Public method | ToString | (Inherited from Object.)
 | UnescapeEntities | Utility method to unescape HTML entities from a string
Top
Properties
 | Name | Description
Public property | CanTrackErrors | Check if parse error tracking is enabled.
Public property | Errors | Retrieve the parse errors, if any, from the last parse.
 | HtmlParser | Create a new HTML parser.
 | XmlParser | Create a new XML parser.
Top
See Also

Reference

Supremes.Parsers Namespace


Parser Methods

Parser Methods

The Parser type exposes the following members.

Methods
 | Name | Description
Public method | Equals | (Inherited from Object.)
Protected method | Finalize | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Protected method | MemberwiseClone | (Inherited from Object.)
 | Parse | Parse HTML into a Document.
 | ParseBodyFragment | Parse a fragment of HTML into the body of a Document.
 | ParseFragment | Parse a fragment of HTML into a list of nodes.
Public method | ParseInput | Parse HTML into a Document
 | ParseXmlFragment | Parse a fragment of XML into a list of nodes.
Public method | SetTrackErrors | Enable or disable parse error tracking for the next parse.
Public method | ToString | (Inherited from Object.)
 | UnescapeEntities | Utility method to unescape HTML entities from a string
Top
See Also

Reference

Parser Class
Supremes.Parsers Namespace


Parser.Parse Method

ParserParse Method

Parse HTML into a Document.

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document Parse(
    string html,
    string baseUri
)
Public Shared Function Parse (
    html As String,
    baseUri As String
) As Document
static member Parse :
        html : string *
        baseUri : string -> Document

Parameters

html
Type: SystemString
HTML to parse
baseUri
Type: SystemString
base URI of document (i.e. original fetch location), for resolving relative URLs.

Return Value

Type: Document
parsed Document
See Also

Reference

Parser Class
Supremes.Parsers Namespace


Parser.ParseBodyFragment Method

ParserParseBodyFragment Method

Parse a fragment of HTML into the body of a Document.

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Document ParseBodyFragment(
    string bodyHtml,
    string baseUri
)
Public Shared Function ParseBodyFragment (
    bodyHtml As String,
    baseUri As String
) As Document
static member ParseBodyFragment :
        bodyHtml : string *
        baseUri : string -> Document

Parameters

bodyHtml
Type: SystemString
fragment of HTML
baseUri
Type: SystemString
base URI of document (i.e. original fetch location), for resolving relative URLs.

Return Value

Type: Document
Document, with empty head, and HTML parsed into body
See Also

Reference

Parser Class
Supremes.Parsers Namespace


Parser.ParseFragment Method

ParserParseFragment Method

Parse a fragment of HTML into a list of nodes.

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static IReadOnlyList<Node> ParseFragment(
    string fragmentHtml,
    Element context,
    string baseUri
)
Public Shared Function ParseFragment (
    fragmentHtml As String,
    context As Element,
    baseUri As String
) As IReadOnlyList(Of Node)
static member ParseFragment :
        fragmentHtml : string *
        context : Element *
        baseUri : string -> IReadOnlyList<Node>

Parameters

fragmentHtml
Type: SystemString
the fragment of HTML to parse
context
Type: Supremes.NodesElement
(optional) the element that this HTML fragment is being parsed for (i.e. for inner HTML). This provides stack context (for implicit element creation).
baseUri
Type: SystemString
base URI of document (i.e. original fetch location), for resolving relative URLs.

Return Value

Type: IReadOnlyList Node
list of nodes parsed from the input HTML. Note that the context element, if supplied, is not modified.
Remarks
The context element, if supplied, supplies parsing context.
See Also

Reference

Parser Class
Supremes.Parsers Namespace


Parser.ParseInput Method

ParserParseInput Method

Parse HTML into a Document

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Document ParseInput(
    string html,
    string baseUri
)
Public Function ParseInput (
    html As String,
    baseUri As String
) As Document
member ParseInput :
        html : string *
        baseUri : string -> Document

Parameters

html
Type: SystemString
baseUri
Type: SystemString

Return Value

Type: Document

[Missing <returns> documentation for "M:Supremes.Parsers.Parser.ParseInput(System.String,System.String)"]

See Also

Reference

Parser Class
Supremes.Parsers Namespace


Parser.ParseXmlFragment Method

ParserParseXmlFragment Method

Parse a fragment of XML into a list of nodes.

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static IReadOnlyList<Node> ParseXmlFragment(
    string fragmentXml,
    string baseUri
)
Public Shared Function ParseXmlFragment (
    fragmentXml As String,
    baseUri As String
) As IReadOnlyList(Of Node)
static member ParseXmlFragment :
        fragmentXml : string *
        baseUri : string -> IReadOnlyList<Node>

Parameters

fragmentXml
Type: SystemString
the fragment of XML to parse
baseUri
Type: SystemString
base URI of document (i.e. original fetch location), for resolving relative URLs.

Return Value

Type: IReadOnlyList Node
list of nodes parsed from the input XML.
See Also

Reference

Parser Class
Supremes.Parsers Namespace


Parser.SetTrackErrors Method

ParserSetTrackErrors Method

Enable or disable parse error tracking for the next parse.

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Parser SetTrackErrors(
    int maxErrors
)
Public Function SetTrackErrors (
    maxErrors As Integer
) As Parser
member SetTrackErrors :
        maxErrors : int -> Parser

Parameters

maxErrors
Type: SystemInt32
the maximum number of errors to track. Set to 0 to disable.

Return Value

Type: Parser
this, for chaining
See Also

Reference

Parser Class
Supremes.Parsers Namespace


Parser.UnescapeEntities Method

ParserUnescapeEntities Method

Utility method to unescape HTML entities from a string

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static string UnescapeEntities(
    string string,
    bool inAttribute
)
Public Shared Function UnescapeEntities (
    string As String,
    inAttribute As Boolean
) As String
static member UnescapeEntities :
        string : string *
        inAttribute : bool -> string

Parameters

string
Type: SystemString
HTML escaped string
inAttribute
Type: SystemBoolean
if the string is to be escaped in strict mode (as attributes are)

Return Value

Type: String
an unescaped string
See Also

Reference

Parser Class
Supremes.Parsers Namespace


Parser Properties

Parser Properties

The Parser type exposes the following members.

Properties
 | Name | Description
Public property | CanTrackErrors | Check if parse error tracking is enabled.
Public property | Errors | Retrieve the parse errors, if any, from the last parse.
 | HtmlParser | Create a new HTML parser.
 | XmlParser | Create a new XML parser.
Top
See Also

Reference

Parser Class
Supremes.Parsers Namespace


Parser.CanTrackErrors Property

ParserCanTrackErrors Property

Check if parse error tracking is enabled.

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool CanTrackErrors { get; }
Public ReadOnly Property CanTrackErrors As Boolean
    Get
member CanTrackErrors : bool with get

Return Value

Type: Boolean
current track error state.
See Also

Reference

Parser Class
Supremes.Parsers Namespace


Parser.Errors Property

ParserErrors Property

Retrieve the parse errors, if any, from the last parse.

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public IList<ParseError> Errors { get; }
Public ReadOnly Property Errors As IList(Of ParseError)
    Get
member Errors : IList<ParseError> with get

Return Value

Type: IList ParseError
list of parse errors, up to the size of the maximum errors tracked.
See Also

Reference

Parser Class
Supremes.Parsers Namespace


Parser.HtmlParser Property

ParserHtmlParser Property

Create a new HTML parser.

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Parser HtmlParser { get; }
Public Shared ReadOnly Property HtmlParser As Parser
    Get
static member HtmlParser : Parser with get

Return Value

Type: Parser
a new HTML parser.
Remarks
This parser treats input as HTML5, and enforces the creation of a normalised document, based on a knowledge of the semantics of the incoming tags.
See Also

Reference

Parser Class
Supremes.Parsers Namespace


Parser.XmlParser Property

ParserXmlParser Property

Create a new XML parser.

Namespace: Supremes.Parsers
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Parser XmlParser { get; }
Public Shared ReadOnly Property XmlParser As Parser
    Get
static member XmlParser : Parser with get

Return Value

Type: Parser
a new simple XML parser.
Remarks
This parser assumes no knowledge of the incoming tags and does not treat it as HTML, rather creates a simple tree directly from the input.
See Also

Reference

Parser Class
Supremes.Parsers Namespace


Supremes.Safety Namespace

Supremes.Safety Namespace

Classes
 | Class | Description
Public class | Cleaner | The whitelist based HTML cleaner.
Public class | Whitelist | Whitelists define what HTML (elements and attributes) to allow through the cleaner.


Cleaner Class

Cleaner Class

The whitelist based HTML cleaner.
Inheritance Hierarchy
SystemObject
Supremes.SafetyCleaner

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class Cleaner
Public NotInheritable Class Cleaner
[<SealedAttribute>]
type Cleaner =  class end

The Cleaner type exposes the following members.

Constructors
 | Name | Description
Public method | Cleaner | Create a new cleaner, that sanitizes documents using the supplied whitelist.
Top
Methods
 | Name | Description
Public method | Clean | Creates a new, clean document, from the original dirty document, containing only elements allowed by the whitelist.
Public method | Equals | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Public method | IsValid | Determines if the input document is valid, against the whitelist.
Public method | ToString | (Inherited from Object.)
Top
Remarks
The whitelist based HTML cleaner. Use to ensure that end-user provided HTML contains only the elements and attributes that you are expecting; no junk, and no cross-site scripting attacks!

The HTML cleaner parses the input as HTML and then runs it through a white-list, so the output HTML can only contain HTML that is allowed by the whitelist.

It is assumed that the input HTML is a body fragment; the clean methods only pull from the source's body, and the canned white-lists only allow body contained tags.

Rather than interacting directly with a Cleaner object, generally see the Clean methods in Supremes.Dcsoup .

See Also

Reference

Supremes.Safety Namespace


Cleaner Constructor

Cleaner Constructor

Create a new cleaner, that sanitizes documents using the supplied whitelist.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Cleaner(
    Whitelist whitelist
)
Public Sub New (
    whitelist As Whitelist
)
new :
        whitelist : Whitelist -> Cleaner

Parameters

whitelist
Type: Supremes.SafetyWhitelist
white-list to clean with
See Also

Reference

Cleaner Class
Supremes.Safety Namespace


Cleaner Methods

Cleaner Methods

The Cleaner type exposes the following members.

Methods
 | Name | Description
Public method | Clean | Creates a new, clean document, from the original dirty document, containing only elements allowed by the whitelist.
Public method | Equals | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Public method | IsValid | Determines if the input document is valid, against the whitelist.
Public method | ToString | (Inherited from Object.)
Top
See Also

Reference

Cleaner Class
Supremes.Safety Namespace


Cleaner.Clean Method

CleanerClean Method

Creates a new, clean document, from the original dirty document, containing only elements allowed by the whitelist.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Document Clean(
    Document dirtyDocument
)
Public Function Clean (
    dirtyDocument As Document
) As Document
member Clean :
        dirtyDocument : Document -> Document

Parameters

dirtyDocument
Type: Supremes.NodesDocument
Untrusted base document to clean.

Return Value

Type: Document
cleaned document.
Remarks
The original document is not modified. Only elements from the dirt document's body are used.
See Also

Reference

Cleaner Class
Supremes.Safety Namespace


Cleaner.IsValid Method

CleanerIsValid Method

Determines if the input document is valid, against the whitelist.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public bool IsValid(
    Document dirtyDocument
)
Public Function IsValid (
    dirtyDocument As Document
) As Boolean
member IsValid :
        dirtyDocument : Document -> bool

Parameters

dirtyDocument
Type: Supremes.NodesDocument
document to test

Return Value

Type: Boolean
true if no tags or attributes need to be removed; false if they do
Remarks
It is considered valid if all the tags and attributes in the input HTML are allowed by the whitelist.

This method can be used as a validator for user input forms. An invalid document will still be cleaned successfully using the Clean(Supremes.Nodes.Document) document. If using as a validator, it is recommended to still clean the document to ensure enforced attributes are set correctly, and that the output is tidied.

See Also

Reference

Cleaner Class
Supremes.Safety Namespace


Whitelist Class

Whitelist Class

Whitelists define what HTML (elements and attributes) to allow through the cleaner.
Inheritance Hierarchy
SystemObject
Supremes.SafetyWhitelist

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public sealed class Whitelist
Public NotInheritable Class Whitelist
[<SealedAttribute>]
type Whitelist =  class end

The Whitelist type exposes the following members.

Constructors
 | Name | Description
Public method | Whitelist | Create a new, empty whitelist.
Top
Methods
 | Name | Description
Public method | AddAttributes | Add a list of allowed attributes to a tag.
Public method | AddEnforcedAttribute | Add an enforced attribute to a tag.
Public method | AddProtocols | Add allowed URL protocols for an element's URL attribute.
Public method | AddTags | Add a list of allowed elements to a whitelist.
Public method | Equals | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Public method | PreserveRelativeLinks | Configure this Whitelist to preserve relative links in an element's URL attribute, or convert them to absolute links.
Public method | ToString | (Inherited from Object.)
Top
Properties
Name | Description
Basic | This whitelist allows a fuller range of text nodes: a, b, blockquote, br, cite, code, dd, dl, dt, em, i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul, and appropriate attributes.
BasicWithImages | This whitelist allows the same text tags as Basic , and also allows img tags, with appropriate attributes, with src pointing to http or https.
None | This whitelist allows only text nodes: all HTML will be stripped.
Relaxed | This whitelist allows a full range of text and structural body HTML: a, b, blockquote, br, caption, cite, code, col, colgroup, dd, div, dl, dt, em, h1, h2, h3, h4, h5, h6, i, img, li, ol, p, pre, q, small, span, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, u, ul Links do not have an enforced rel=nofollow attribute, but you can add that if desired.
SimpleText | This whitelist allows only simple text formatting: b, em, i, strong, u.
Top
Remarks
Everything else is removed.

Start with one of the defaults:

  • None
  • SimpleText
  • Basic
  • BasicWithImages
  • Relaxed

If you need to allow more through (please be careful!), tweak a base whitelist with:

  • AddTags(string[])
  • AddAttributes(string, string[])
  • AddEnforcedAttribute(string, string, string)
  • AddProtocols(string, string, string[])

The cleaner and these whitelists assume that you want to clean a body fragment of HTML (to add user supplied HTML into a templated page), and not to clean a full HTML document. If the latter is the case, either wrap the document HTML around the cleaned body HTML, or create a whitelist that allows html and head elements as appropriate.

If you are going to extend a whitelist, please be very careful. Make sure you understand what attributes may lead to XSS attack vectors. URL attributes are particularly vulnerable and require careful validation. See http://ha.ckers.org/xss.html for some XSS attack examples.

See Also

Reference

Supremes.Safety Namespace


Whitelist Constructor

Whitelist Constructor

Create a new, empty whitelist.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Whitelist()
Public Sub New
new : unit -> Whitelist
Remarks
Generally it will be better to start with a default prepared whitelist instead.
See Also

Reference

Whitelist Class
Supremes.Safety Namespace
Basic
BasicWithImages
SimpleText
Relaxed


Whitelist Methods

Whitelist Methods

The Whitelist type exposes the following members.

Methods
 | Name | Description
Public method | AddAttributes | Add a list of allowed attributes to a tag.
Public method | AddEnforcedAttribute | Add an enforced attribute to a tag.
Public method | AddProtocols | Add allowed URL protocols for an element's URL attribute.
Public method | AddTags | Add a list of allowed elements to a whitelist.
Public method | Equals | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Public method | PreserveRelativeLinks | Configure this Whitelist to preserve relative links in an element's URL attribute, or convert them to absolute links.
Public method | ToString | (Inherited from Object.)
Top
See Also

Reference

Whitelist Class
Supremes.Safety Namespace


Whitelist.AddAttributes Method

WhitelistAddAttributes Method

Add a list of allowed attributes to a tag.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Whitelist AddAttributes(
    string tag,
    params string[] keys
)
Public Function AddAttributes (
    tag As String,
    ParamArray keys As String()
) As Whitelist
member AddAttributes :
        tag : string *
        keys : string[] -> Whitelist

Parameters

tag
Type: SystemString
The tag the attributes are for. The tag will be added to the allowed tag list if necessary.
keys
Type: SystemString
List of valid attributes for the tag

Return Value

Type: Whitelist
this (for chaining)
Remarks
(If an attribute is not allowed on an element, it will be removed.)

E.g.: addAttributes("a", "href", "class") allows href and class attributes on a tags.

To make an attribute valid for all tags, use the pseudo tag :all, e.g. addAttributes(":all", "class").

See Also

Reference

Whitelist Class
Supremes.Safety Namespace


Whitelist.AddEnforcedAttribute Method

WhitelistAddEnforcedAttribute Method

Add an enforced attribute to a tag.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Whitelist AddEnforcedAttribute(
    string tag,
    string key,
    string value
)
Public Function AddEnforcedAttribute (
    tag As String,
    key As String,
    value As String
) As Whitelist
member AddEnforcedAttribute :
        tag : string *
        key : string *
        value : string -> Whitelist

Parameters

tag
Type: SystemString
The tag the enforced attribute is for. The tag will be added to the allowed tag list if necessary.
key
Type: SystemString
The attribute key
value
Type: SystemString
The enforced attribute value

Return Value

Type: Whitelist
this (for chaining)
Remarks
An enforced attribute will always be added to the element. If the element already has the attribute set, it will be overridden.

E.g.: AddEnforcedAttribute("a", "rel", "nofollow") will make all a tags output as <a href="..." rel="nofollow">

See Also

Reference

Whitelist Class
Supremes.Safety Namespace


Whitelist.AddProtocols Method

WhitelistAddProtocols Method

Add allowed URL protocols for an element's URL attribute.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Whitelist AddProtocols(
    string tag,
    string key,
    params string[] protocols
)
Public Function AddProtocols (
    tag As String,
    key As String,
    ParamArray protocols As String()
) As Whitelist
member AddProtocols :
        tag : string *
        key : string *
        protocols : string[] -> Whitelist

Parameters

tag
Type: SystemString
Tag the URL protocol is for
key
Type: SystemString
Attribute key
protocols
Type: SystemString
List of valid protocols

Return Value

Type: Whitelist
this, for chaining
Remarks
This restricts the possible values of the attribute to URLs with the defined protocol.

E.g.: AddProtocols("a", "href", "ftp", "http", "https")

See Also

Reference

Whitelist Class
Supremes.Safety Namespace


Whitelist.AddTags Method

WhitelistAddTags Method

Add a list of allowed elements to a whitelist.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Whitelist AddTags(
    params string[] tags
)
Public Function AddTags (
    ParamArray tags As String()
) As Whitelist
member AddTags :
        tags : string[] -> Whitelist

Parameters

tags
Type: SystemString
tag names to allow

Return Value

Type: Whitelist
this (for chaining)
Remarks
(If a tag is not allowed, it will be removed from the HTML.)
See Also

Reference

Whitelist Class
Supremes.Safety Namespace


Whitelist.PreserveRelativeLinks Method

WhitelistPreserveRelativeLinks Method

Configure this Whitelist to preserve relative links in an element's URL attribute, or convert them to absolute links.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public Whitelist PreserveRelativeLinks(
    bool preserve
)
Public Function PreserveRelativeLinks (
    preserve As Boolean
) As Whitelist
member PreserveRelativeLinks :
        preserve : bool -> Whitelist

Parameters

preserve
Type: SystemBoolean
true to allow relative links, false (default) to deny

Return Value

Type: Whitelist
this Whitelist, for chaining.
Remarks
Configure this Whitelist to preserve relative links in an element's URL attribute, or convert them to absolute links. By default, this is false: URLs will be made absolute (e.g. start with an allowed protocol, like e.g. http:// .

Note that when handling relative links, the input document must have an appropriate base URI set when parsing, so that the link's protocol can be confirmed. Regardless of the setting of the preserve relative links option, the link must be resolvable against the base URI to an allowed protocol; otherwise the attribute will be removed.

See Also

Reference

Whitelist Class
Supremes.Safety Namespace
AddProtocols(string, string, string[])


Whitelist Properties

Whitelist Properties

The Whitelist type exposes the following members.

Properties
Name | Description
Basic | This whitelist allows a fuller range of text nodes: a, b, blockquote, br, cite, code, dd, dl, dt, em, i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul, and appropriate attributes.
BasicWithImages | This whitelist allows the same text tags as Basic , and also allows img tags, with appropriate attributes, with src pointing to http or https.
None | This whitelist allows only text nodes: all HTML will be stripped.
Relaxed | This whitelist allows a full range of text and structural body HTML: a, b, blockquote, br, caption, cite, code, col, colgroup, dd, div, dl, dt, em, h1, h2, h3, h4, h5, h6, i, img, li, ol, p, pre, q, small, span, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, u, ul Links do not have an enforced rel=nofollow attribute, but you can add that if desired.
SimpleText | This whitelist allows only simple text formatting: b, em, i, strong, u.
Top
See Also

Reference

Whitelist Class
Supremes.Safety Namespace


Whitelist.Basic Property

WhitelistBasic Property

This whitelist allows a fuller range of text nodes: a, b, blockquote, br, cite, code, dd, dl, dt, em, i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul, and appropriate attributes.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Whitelist Basic { get; }
Public Shared ReadOnly Property Basic As Whitelist
    Get
static member Basic : Whitelist with get

Return Value

Type: Whitelist
whitelist
Remarks

Links (a elements) can point to http, https, ftp, mailto, and have an enforced rel=nofollow attribute.

Does not allow images.

See Also

Reference

Whitelist Class
Supremes.Safety Namespace


Whitelist.BasicWithImages Property

WhitelistBasicWithImages Property

This whitelist allows the same text tags as Basic , and also allows img tags, with appropriate attributes, with src pointing to http or https.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Whitelist BasicWithImages { get; }
Public Shared ReadOnly Property BasicWithImages As Whitelist
    Get
static member BasicWithImages : Whitelist with get

Return Value

Type: Whitelist
whitelist
See Also

Reference

Whitelist Class
Supremes.Safety Namespace


Whitelist.None Property

WhitelistNone Property

This whitelist allows only text nodes: all HTML will be stripped.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Whitelist None { get; }
Public Shared ReadOnly Property None As Whitelist
    Get
static member None : Whitelist with get

Return Value

Type: Whitelist
whitelist
See Also

Reference

Whitelist Class
Supremes.Safety Namespace


Whitelist.Relaxed Property

WhitelistRelaxed Property

This whitelist allows a full range of text and structural body HTML: a, b, blockquote, br, caption, cite, code, col, colgroup, dd, div, dl, dt, em, h1, h2, h3, h4, h5, h6, i, img, li, ol, p, pre, q, small, span, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, u, ul

Links do not have an enforced rel=nofollow attribute, but you can add that if desired.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Whitelist Relaxed { get; }
Public Shared ReadOnly Property Relaxed As Whitelist
    Get
static member Relaxed : Whitelist with get

Return Value

Type: Whitelist
whitelist
Remarks
This whitelist allows a full range of text and structural body HTML: a, b, blockquote, br, caption, cite, code, col, colgroup, dd, div, dl, dt, em, h1, h2, h3, h4, h5, h6, i, img, li, ol, p, pre, q, small, span, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, u, ul

Links do not have an enforced rel=nofollow attribute, but you can add that if desired.

See Also

Reference

Whitelist Class
Supremes.Safety Namespace


Whitelist.SimpleText Property

WhitelistSimpleText Property

This whitelist allows only simple text formatting: b, em, i, strong, u.

Namespace: Supremes.Safety
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Whitelist SimpleText { get; }
Public Shared ReadOnly Property SimpleText As Whitelist
    Get
static member SimpleText : Whitelist with get

Return Value

Type: Whitelist
whitelist
Remarks
All other HTML (tags and attributes) will be removed.
See Also

Reference

Whitelist Class
Supremes.Safety Namespace


Supremes.Select Namespace

Supremes.Select Namespace

Classes
 | Class | Description
Public class | Selector | CSS-like element selector, that finds elements matching a query.
Public class | SelectorSelectorParseException | The exception that is thrown when a Selector parses an invalid query.


Selector Class

Selector Class

CSS-like element selector, that finds elements matching a query.
Inheritance Hierarchy
SystemObject
Supremes.SelectSelector

Namespace: Supremes.Select
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public class Selector
Public Class Selector
type Selector =  class end

The Selector type exposes the following members.

Methods
 | Name | Description
Public method | Equals | (Inherited from Object.)
Protected method | Finalize | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Protected method | MemberwiseClone | (Inherited from Object.)
 | Select(String, Element) | Find elements matching selector.
 | Select(String, IEnumerableElement) | Find elements matching selector.
Public method | ToString | (Inherited from Object.)
Top
Remarks

Selector syntax

A selector is a chain of simple selectors, separated by combinators. Selectors are case insensitive (including against elements, attributes, and attribute values).

The universal selector (*) is implicit when no element selector is supplied (i.e. *.header and .header is equivalent).

Pattern | Matches | Example
* any element *
tag | elements with the given tag name | div
ns|E | elements of type E in the namespace ns | fb|name finds <fb:name> elements
#id | elements with attribute ID of "id" | div#wrap, #logo
.class | elements with a class name of "class" | div.left, .result
[attr] | elements with an attribute named "attr" (with any value) | a[href], [title]
[^attrPrefix] | elements with an attribute name starting with "attrPrefix". Use to find elements with HTML5 datasets | [^data-], div[^data-]
[attr=val] | elements with an attribute named "attr", and value equal to "val" | img[width=500], a[rel=nofollow]
[attr="val"] | elements with an attribute named "attr", and value equal to "val" | span[hello="Cleveland"][goodbye="Columbus"], a[rel="nofollow"]
[attr^=valPrefix] | elements with an attribute named "attr", and value starting with "valPrefix" | a[href^=http:]
[attr$=valSuffix] | elements with an attribute named "attr", and value ending with "valSuffix" | img[src$=.png]
[attr*=valContaining] | elements with an attribute named "attr", and value containing "valContaining" | a[href*=/search/]
[attr~=regex] | elements with an attribute named "attr", and value matching the regular expression | img[src~=(?i)\\.(png|jpe?g)]
The above may be combined in any order | div.header[title]

Combinators

E F | an F element descended from an E element | div a, .logo h1
E > F | an F direct child of E | ol > li
E + F | an F element immediately preceded by sibling E | li + li, div.head + div
E ~ F | an F element preceded by sibling E | h1 ~ p
E, F, G | all matching elements E, F, or G | a[href], div, h3

Pseudo selectors

:lt(n) | elements whose sibling index is less than n | td:lt(3) finds the first 2 cells of each row
:gt(n) | elements whose sibling index is greater than n | td:gt(1) finds cells after skipping the first two
:eq(n) | elements whose sibling index is equal to n | td:eq(0) finds the first cell of each row
:has(selector) | elements that contains at least one element matching the selector | div:has(p) finds divs that contain p elements
:not(selector) elements that do not match the selector. See also Supremes.Nodes.Elements.Not(string) div:not(.logo) finds all divs that do not have the "logo" class.
div:not(:has(div)) finds divs that do not contain divs.
:contains(text) | elements that contains the specified text. The search is case insensitive. The text may appear in the found element, or any of its descendants. | p:contains(jsoup) finds p elements containing the text "jsoup".
:matches(regex) | elements whose text matches the specified regular expression. The text may appear in the found element, or any of its descendants. | td:matches(\\d+) finds table cells containing digits. div:matches((?i)login) finds divs containing the text, case insensitively.
:containsOwn(text) | elements that directly contain the specified text. The search is case insensitive. The text must appear in the found element, not any of its descendants. | p:containsOwn(jsoup) finds p elements with own text "jsoup".
:matchesOwn(regex) | elements whose own text matches the specified regular expression. The text must appear in the found element, not any of its descendants. | td:matchesOwn(\\d+) finds table cells directly containing digits. div:matchesOwn((?i)login) finds divs containing the text, case insensitively.
The above may be combined in any order and with other selectors | .light:contains(name):eq(0)

Structural pseudo selectors

:root | The element that is the root of the document. In HTML, this is the html element | :root
:nth-child(an+b)

elements that have an+b-1 siblings before it in the document tree, for any positive integer or zero value of n, and has a parent element. For values of a and b greater than zero, this effectively divides the element's children into groups of a elements (the last group taking the remainder), and selecting the bth element of each group. For example, this allows the selectors to address every other row in a table, and could be used to alternate the color of paragraph text in a cycle of four. The a and b values must be integers (positive, negative, or zero). The index of the first child of an element is 1.

In addition to this, :nth-child() can take odd and even as arguments instead. odd has the same signification as 2n+1, and even has the same signification as 2n. 		tr:nth-child(2n+1) finds every odd row of a table. :nth-child(10n-1) the 9th, 19th, 29th, etc, element. li:nth-child(5) the 5h li
:nth-last-child(an+b) | elements that have an+b-1 siblings after it in the document tree. Otherwise like :nth-child() | tr:nth-last-child(-n+2) the last two rows of a table
:nth-of-type(an+b) | pseudo-class notation represents an element that has an+b-1 siblings with the same expanded element name before it in the document tree, for any zero or positive integer value of n, and has a parent element | img:nth-of-type(2n+1)
:nth-last-of-type(an+b) | pseudo-class notation represents an element that has an+b-1 siblings with the same expanded element name after it in the document tree, for any zero or positive integer value of n, and has a parent element | img:nth-last-of-type(2n+1)
:first-child | elements that are the first child of some other element. | div > p:first-child
:last-child | elements that are the last child of some other element. | ol > li:last-child
:first-of-type | elements that are the first sibling of its type in the list of children of its parent element | dl dt:first-of-type
:last-of-type | elements that are the last sibling of its type in the list of children of its parent element | tr > td:last-of-type
:only-child | elements that have a parent element and whose parent element hasve no other element children
:only-of-type | an element that has a parent element and whose parent element has no other element children with the same expanded element name
:empty | elements that have no children at all

See Also

Reference

Supremes.Select Namespace
Supremes.Nodes.Element.Select(string)


Selector Methods

Selector Methods

The Selector type exposes the following members.

Methods
 | Name | Description
Public method | Equals | (Inherited from Object.)
Protected method | Finalize | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Protected method | MemberwiseClone | (Inherited from Object.)
 | Select(String, Element) | Find elements matching selector.
 | Select(String, IEnumerableElement) | Find elements matching selector.
Public method | ToString | (Inherited from Object.)
Top
See Also

Reference

Selector Class
Supremes.Select Namespace


Selector.Select Method

SelectorSelect Method

Overload List
Name | Description
Select(String, Element) | Find elements matching selector.
Select(String, IEnumerableElement) | Find elements matching selector.
Top
See Also

Reference

Selector Class
Supremes.Select Namespace


Selector.Select Method (String, Element)

SelectorSelect Method (String, Element)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Find elements matching selector.

Namespace: Supremes.Select
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Elements Select(
    string query,
    Element root
)
Public Shared Function Select (
    query As String,
    root As Element
) As Elements
static member Select :
        query : string *
        root : Element -> Elements

Parameters

query
Type: SystemString
CSS selector
root
Type: Supremes.NodesElement
root element to descend into

Return Value

Type: Elements
matching elements, empty if not
See Also

Reference

Selector Class
Select Overload
Supremes.Select Namespace


Selector.Select Method (String, IEnumerable(Element))

SelectorSelect Method (String, IEnumerableElement)
version 0.2.0

[This is preliminary documentation and is subject to change.]

Find elements matching selector.

Namespace: Supremes.Select
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public static Elements Select(
    string query,
    IEnumerable<Element> roots
)
Public Shared Function Select (
    query As String,
    roots As IEnumerable(Of Element)
) As Elements
static member Select :
        query : string *
        roots : IEnumerable<Element> -> Elements

Parameters

query
Type: SystemString
CSS selector
roots
Type: System.Collections.GenericIEnumerable Element
root elements to descend into

Return Value

Type: Elements
matching elements, empty if not
See Also

Reference

Selector Class
Select Overload
Supremes.Select Namespace


Selector.SelectorParseException Class

SelectorSelectorParseException Class

The exception that is thrown when a Selector parses an invalid query.
Inheritance Hierarchy
SystemObject
SystemException
SystemSystemException
SystemInvalidOperationException
Supremes.SelectSelectorSelectorParseException

Namespace: Supremes.Select
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
[SerializableAttribute]
public class SelectorParseException : InvalidOperationException
<SerializableAttribute>
Public Class SelectorParseException
    Inherits InvalidOperationException
[<SerializableAttribute>]
type SelectorParseException =
    class
        inherit InvalidOperationException
    end

The SelectorSelectorParseException type exposes the following members.

Constructors
 | Name | Description
Public method | SelectorSelectorParseException | Initializes a new instance of the SelectorSelectorParseException class.
Top
Methods
 | Name | Description
Public method | Equals | (Inherited from Object.)
Protected method | Finalize | (Inherited from Object.)
Public method | GetBaseException | (Inherited from Exception.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetObjectData | (Inherited from Exception.)
Public method | GetType | (Inherited from Exception.)
Protected method | MemberwiseClone | (Inherited from Object.)
Public method | ToString | (Inherited from Exception.)
Top
Properties
 | Name | Description
Public property | Data | (Inherited from Exception.)
Public property | HelpLink | (Inherited from Exception.)
Public property | HResult | (Inherited from Exception.)
Public property | InnerException | (Inherited from Exception.)
Public property | Message | (Inherited from Exception.)
Public property | Source | (Inherited from Exception.)
Public property | StackTrace | (Inherited from Exception.)
Public property | TargetSite | (Inherited from Exception.)
Top
Events
 | Name | Description
Protected event | SerializeObjectState | (Inherited from Exception.)
Top
See Also

Reference

Supremes.Select Namespace


Selector.SelectorParseException Constructor

SelectorSelectorParseException Constructor

Initializes a new instance of the SelectorSelectorParseException class.

Namespace: Supremes.Select
Assembly: Supremes (in Supremes.dll) Version: 0.2.0.18772
Syntax
C#
VB
F#
Copy
public SelectorParseException(
    string msg,
    params Object[] params
)
Public Sub New (
    msg As String,
    ParamArray params As Object()
)
new :
        msg : string *
        params : Object[] -> SelectorParseException

Parameters

msg
Type: SystemString
A composite format string.
params
Type: SystemObject
An object array that contains zero or more objects to format.
See Also

Reference

SelectorSelectorParseException Class
Supremes.Select Namespace


SelectorParseException Methods

SelectorParseException Methods

The SelectorSelectorParseException type exposes the following members.

Methods
 | Name | Description
Public method | Equals | (Inherited from Object.)
Protected method | Finalize | (Inherited from Object.)
Public method | GetBaseException | (Inherited from Exception.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetObjectData | (Inherited from Exception.)
Public method | GetType | (Inherited from Exception.)
Protected method | MemberwiseClone | (Inherited from Object.)
Public method | ToString | (Inherited from Exception.)
Top
See Also

Reference

SelectorSelectorParseException Class
Supremes.Select Namespace


SelectorParseException Properties

SelectorParseException Properties

The SelectorSelectorParseException type exposes the following members.

Properties
 | Name | Description
Public property | Data | (Inherited from Exception.)
Public property | HelpLink | (Inherited from Exception.)
Public property | HResult | (Inherited from Exception.)
Public property | InnerException | (Inherited from Exception.)
Public property | Message | (Inherited from Exception.)
Public property | Source | (Inherited from Exception.)
Public property | StackTrace | (Inherited from Exception.)
Public property | TargetSite | (Inherited from Exception.)
Top
See Also

Reference

SelectorSelectorParseException Class
Supremes.Select Namespace


SelectorParseException Events

SelectorParseException Events

The SelectorSelectorParseException type exposes the following members.

Events
 | Name | Description
Protected event | SerializeObjectState | (Inherited from Exception.)
Top
See Also

Reference

SelectorSelectorParseException Class
Supremes.Select Namespace