CsQuery
Global configuration and defaults
Internal to avoid Obsolete warning from DomRenderingOptions until we remove it
Creates an OutputFormatter using the default options & encoder.
The default output formatter.
The default startup options. These are flags.
The default rendering options. These will be used when configuring a default OutputFormatter.
Note that if the default OutputFormatter has been changed, this setting is not guaranteed to
have any effect on output.
The default HTML parsing options. These will be used when parsing HTML without specifying any options.
The default HTML encoder.
The default OutputFormatter. The GetOutputFormatter property can also be used to provide a
new instance whenever a default OutputFormatter is requested; setting that property will
supersede any existing value of this property.
A delegate that returns a new instance of the default output formatter to use for rendering.
The OutputFormatter property can also be used to return a single instance of a reusable
IOutputFormatter object; setting that property will supersede any existing value of this
property.
A method that returns a new HttpWebRequest. This is mostly useful for providing an alternate
implementation for testing.
Default document type. This is the parsing mode that will be used when creating documents
that have no DocType and no mode is explicitly defined.
Gets or sets the default dynamic object type. This is the type of object used by default when
parsing JSON into an unspecified type.
Provides access to the PseudoSelectors object, which allows registering new filters and accessing information
and instances about existing filters.
The pseudo PseudoSelectors configuration object.
Flags for specifying initial configuration behavior of CsQuery.
When true, CsQuery will scan the client assembly for extensions. Any classes
found in a namespace CsQuery.Extensions will be configured automatically. Default is true;
disable this flag to disable this behavior
The CQ object is analogus to the basic jQuery object. It has instance methods that mirror the
methods of a jQuery object, and static methods that mirror utility methods such as "$.map".
Most methods return a new jQuery object that is bound to the same document, but a different
selection set. In a web browser, you genally only have a single context (the browser DOM).
Here, you could have many, though most of the time you will only be working with one.
Document is an IDomDocument object, referred to sometimes as the "DOM", and represents the
DOM that this CsQuery objects applies to. When CQ methods are run, the resulting CQ object
will refer to the same Document as the original. Selectors always run against this DOM.
Creating a CQ object from something that is not bound to a DOM (such as an HTML string, or an
unbound IDomObject or IDomElement object) will result in a new Document being created, that
is unrelated to any other active objects you may have. Adding unbound elements using methods
such as Append will cause them to become part of the target DOM. They will be removed from
whatever DOM they previously belonged to. (Elements cannot be part of more than one DOM). If
you don't want to remove something while adding to a CQ object from a different DOM, then you
should clone the elements.
Selection is a set of DOM nodes matching the selector.
Elements is a set of IDomElement nodes matching the selector. This is a subset of Selection -
it excludes non-Element nodes.
The static Create() methods create new DOMs. To create a CsQuery object based on an existing
dom, use new CQ() (similar to jQuery() methods).
Most of the jQuery methods are implemented in separate files under the "CQ_jQuery" folder.
Methods which are not part of the jQuery API are found under the "CQ_CsQuery" folder.
Test for the existence of an attribute.
The name of the attribute to get.
A string of the attribute value, or null if the attribute does not exist.
Perform a substring replace on the contents of the named attribute in each item in the
selection set.
The attribute name.
The string to match.
The value to replace each occurrence with.
The current CQ object.
Return the current assembly's version.
A string
Creates a new DOM from an HTML file.
The URL of the remote server.
The options to use when creating the reqest.
A CQ object composed from the HTML response from the server.
Start an asynchronous request to an HTTP server, returning a promise that will resolve when
the request is completed or rejected.
The URL of the remote server
The options to use when creating the reqest
A promise that resolves when the request completes
Start an asynchronous request to an HTTP server.
The URL of the remote server.
A delegate to invoke upon successful completion of the request.
A delegate to invoke upon failure.
Options to use when creating the request.
A unique identifier which will be passed through to the response and can be used to assocate
a response with this request.
Start an asynchronous request to an HTTP server.
The URL of the remote server.
An identifier that will be passed through to the response.
A delegate to invoke upon successful completion of the request.
A delegate to invoke upon failure.
Options to use when creating the request.
Waits until all async events have completed. Use for testing primarily as a web app should
not stop normally.
The maximum number of milliseconds to wait.
true if all events were cleared in the allotted time, false if not.
Return a new promise that resolves when all the promises passed in are resolved.
One or more promises
A new promise
Create an empty CQ object.
A new CQ object
Create a new CQ object from a single element. Unlike the constructor method
this new objet is not bound to any context from the element.
A string containing HTML.
A new CQ object.
Create a new CQ object from an HTML character array. Node: this method is obsolete; it may be
removed in a future release. Character arrays were supported in prior versions because this
was how all data was converted internally; this is not the case any more, and it's an
unlikely format for typical input. Use string or stream methods instead.
The HTML source for the document.
A new CQ object.
Create a new CQ object from a single element. Unlike the constructor method
this new objet is not bound to any context from the element.
The element to wrap
A new CQ object
Creeate a new CQ object from an HTML string.
A string containing HTML.
(optional) the mode.
(optional) options for controlling the parsing.
(optional) type of the document.
A new CQ object.
Create a new CQ from an HTML fragment, and use quickSet to create attributes (and/or css)
A string of HTML.
an object containing CSS properties and attributes to be applied to the resulting fragment.
A new CQ object
Creeate a new CQ object from a squence of elements, or another CQ object. The new object will
contain clones of the original objects; they are no longer bound to their owning context. If
you want to wrap these elements and retain their context, use "new CQ(...)" instead.
A sequence of elements.
A new CQ object.
Create a new CQ object from a stream of HTML text, attempting to automatically detect the
character set encoding from BOM.
An open Stream.
A new CQ object.
Create a new CQ from a stream of HTML text in the specified encoding.
An open Stream.
The character set encoding.
A new CQ object.
Create a new CQ object from a TextReader containing HTML.
A TextReader containing HTML.
A new CQ object.
Create a new CQ object from a stream of HTML, treating the HTML as a content document.
An open Stream.
The character set encoding.
(optional) the mode.
(optional) options for controlling the parsing.
(optional) type of the document.
A new CQ object.
Create a new CQ object from a TextReader containg HTML
A string of HTML.
(optional) the mode.
(optional) options for controlling the parsing.
(optional) type of the document.
The new fragment.
Create a new fragment from a TextReader containing HTML text.
A string of HTML.
The new fragment.
Creeate a new fragment from HTML text, in the context of a specific HTML tag.
A string of HTML.
The HTML tag name which is the context
The new fragment.
Create a new CQ object from a sequence of elements, or another CQ object.
A sequence of elements.
The new fragment.
Creeate a new DOM from HTML text using full HTML5 tag generation.
A string of HTML
The new document.
Creates a new DOM from a stream containing HTML
An open Stream
The new document.
Creeate a new DOM from HTML text using full HTML5 tag generation.
An open Stream.
The character set encoding.
The new document.
Creates a new DOM from a stream containing HTML
A n open Stream
The new document.
Creates a new DOM from an HTML file.
The full path to the file
The new document from file.
Creates a new DOM from an HTML file.
The full path to the file
The new from file.
Save the current Document to an HTML file.
A new CQ object.
The current selection set will become the only members of the document in this object. This
is a destructive method that will completely replace the document.
The current CQ object
The elements identified by the selector will become the only members of the document in this
object. This is a destructive method that will completely replace the document.
A selector that determines which elements will become the new document.
The current CQ object
Given a table header or cell, returns all members of the column in the table. This will most
likely not work as you would expect if there are colspan cells.
A new CQ object containing all the th and td cells in the specified column.
Selects then zero-based nth cells (th and td) from all rows in any matched tables. This will
most likely no do what you expect if the table has colspan cells.
The zero-based index of the column to target.
A new CQ object containing all the th and td cells in the specified column.
Set a specific item, identified by the 2nd parameter, of a named option group, identified by
the first parameter, as selected.
The value of the name attribute identifying this option group.
The option value to set as selected
The current CQ object
Conditionally includes a selection. This is the equivalent of calling Remove() only when
"include" is false.
true to include, false to exclude.
The current CQ object
Given two selectors, shows the content of one, and removes the content of the other, based on
the boolean parameter.
A boolean value to indicate whether the first or second selector should be used to determine
the elements that are kept. When true, the first is kept and the 2nd removed. When false, the
opposite happens.
The true selector.
The false selector.
The current CQ object.
Given two CQ objects, shows the one, and removes the the other from the document, based on
the boolean parameter.
A boolean value to indicate whether the first or second selector should be used to determine
the elements that are kept. When true, the first is kept and the 2nd removed. When false, the
opposite happens.
The true content.
The false content.
The current CQ object.
Removes all but one of a list selectors/objects based on the zero-based index of the first
parameter. The remaining one is explicitly shown.
An integer representing the zero-based index of the content from the list of items passed
which should be kept and shown.
A variable-length parameters list containing content.
The current CQ object
Removes all but one of a list selectors/objects based on the zero-based index of the first
parameter. The remaining one is explicitly shown.
An integer representing the zero-based index of the content from the list of items passed
which should be kept and shown.
A variable-length parameters list containing content.
The current CQ object.
The first IDomElement (e.g. not text/special nodes) in the selection set, or null if none
exists.
An IDomElement object.
Return a CsQuery object wrapping the enumerable passed, or the object itself if it's already
a CsQuery obect. Unlike CsQuery(context), this will not create a new CsQuery object from an
existing one.
A sequence of IDomObject elements.
A new CQ object when the source is disconnect elements, or the CQ object passed.
Returns the HTML for all selected documents, separated by commas. No inner html or children
are included.
This method does not return valid HTML, but rather a single string containing an abbreviated
version of the markup for only documents in the selection set, separated by commas. This is
intended for inspecting a selection set, for example while debugging.
A string of HTML.
Returns the HTML for all selected documents, separated by commas.
This method does not return valid HTML, but rather a single string containing an abbreviated
version of the markup for only documents in the selection set, separated by commas. This is
intended for inspecting a selection set, for example while debugging.
When true, the complete HTML (e.g. including children) is included for each element.
A string of HTML.
Create a new, empty CsQuery object bound to this domain.
A new CQ object.
Creates a new instance of the CQ object. This should be used inside CQ to create a new object
under all circumstances so it can be overridden by derived classes.
A new CQ object
Renders just the selection set completely.
This method will only render the HTML for elements in the current selection set. To render
the entire document for output, use the Render method.
A string of HTML.
Renders just the selection set completely.
The output formatter.
A string of HTML.
Renders just the selection set completely.
The output formatter.
The writer.
A string of HTML.
Renders the document to a string.
This method renders the entire document, regardless of the current selection. This is the
primary method used for rendering the final HTML of a document after manipulation; it
includes the <doctype> and <html> nodes.
A string of HTML.
Render the complete DOM with specific options.
(optional) option flags that control how the output is rendered.
A string of HTML.
Render the entire document, parsed through a formatter passed using the parameter.
CsQuery by default does not format the output at all, but rather returns exactly the same
contents of each element from the source, including all extra whitespace. If you want to
produce output that is formatted in a specific way, you can create an OutputFormatter for
this purpose. The included does some
basic formatting by removing extra whitespace and adding newlines in a few useful places.
(This formatter is pretty basic). A formatter to perform indenting to create human-readable
output would be useful and will be included in some future release.
An object that parses a CQ object and returns a string of HTML.
A string of HTML.
Render the entire document, parsed through a formatter passed using the parameter, to the
specified writer.
The formatter.
The writer.
Render the entire document, parsed through a formatter passed using the parameter, with the
specified options.
The sb.
(optional) options for controlling the operation.
Insert content, specified by the parameter, to the end of each element in the set of matched
elements.
One or more HTML strings to append.
The current CQ object.
http://api.jquery.com/append/
Insert the element, specified by the parameter, to the end of each element in the set of
matched elements.
The element to exclude.
The current CQ object.
http://api.jquery.com/append/
Insert the sequence of elements, specified by the parameter, to the end of each element in
the set of matched elements.
The elements to be excluded.
The current CQ object.
http://api.jquery.com/append/
Appends a func.
A delegate to a function that returns an HTML string to insert at the end
of each element in the set of matched elements. Receives the index position of the element in
the set and the old HTML value of the element as arguments. Within the function, this refers
to the current element in the set.
The current CQ object.
http://api.jquery.com/append/
Insert content, specified by the parameter, to the end of each element in the set of matched
elements.
A delegate to a function that returns an IDomElement to insert at the end of each element in
the set of matched elements. Receives the index position of the element in the set and the
old HTML value of the element as arguments. Within the function, this refers to the current
element in the set.
The current CQ object.
http://api.jquery.com/append/
Insert content, specified by the parameter, to the end of each element in the set of matched
elements.
A delegate to a function that returns a sequence of IDomElement objects to insert at the end
of each element in the set of matched elements. Receives the index position of the element in
the set and the old HTML value of the element as arguments. Within the function, this refers
to the current element in the set.
The current CQ object.
http://api.jquery.com/append/
Append each element passed by parameter to each element in the selection set. The inserted
elements are returned.
The elements to be excluded.
A CQ object containing all the elements added.
The current CQ object.
Deals with tbody as the target of appends.
The true target.
Either the element itself, or the TBODY element if the target was a TABLE
Add elements to the set of matched elements from a selector or an HTML fragment.
A CSS selector.
A new CQ object.
http://api.jquery.com/add/
Add an element to the set of matched elements.
The element to add.
A new CQ object.
http://api.jquery.com/add/
Add elements to the set of matched elements.
The elements to add.
A new CQ object.
http://api.jquery.com/add/
Add elements to the set of matched elements from a selector or an HTML fragment.
A string representing a selector expression to find additional elements to add to the set of
matched elements.
The point in the document at which the selector should begin matching; similar to the context
argument of the $(selector, context) method.
A new CQ object.
http://api.jquery.com/add/
Add elements to the set of matched elements from a selector or an HTML fragment.
A string representing a selector expression to find additional elements to add to the set of
matched elements.
The point in the document at which the selector should begin matching; similar to the context
argument of the $(selector, context) method.
A new CQ object.
http://api.jquery.com/add/
Adds the specified class, or each class in a space-separated list, to each of the set of
matched elements.
One or more class names to be added to the class attribute of each matched element.
The current CQ object.
http://api.jquery.com/addclass/
Add or remove one or more classes from each element in the set of matched elements, depending
on either the class's presence.
One or more class names (separated by spaces) to be toggled for each element in the matched
set.
The current CQ object.
http://api.jquery.com/toggleClass/
Add or remove one or more classes from each element in the set of matched elements, depending
on the value of the switch argument.
One or more class names (separated by spaces) to be toggled for each element in the matched
set.
a boolean value that determine whether the class should be added (true) or removed (false).
The current CQ object.
http://api.jquery.com/toggleClass/
Determine whether any of the matched elements are assigned the given class.
The class name to search for.
true if the class exists on any of the elements, false if not.
http://api.jquery.com/hasclass/
Insert every element in the set of matched elements to the end of each element in the targets.
The .Append() and .appendTo() methods perform the same task. The major difference is in the
syntax-specifically, in the placement of the content and target. With .Append(), the selector
expression preceding the method is the container into which the content is inserted. With
.AppendTo(), on the other hand, the content precedes the method, either as a selector
expression or as markup created on the fly, and it is inserted into the target container.
A selector that results in HTML to which the selection set will be appended.
A CQ object containing all the elements added
http://api.jquery.com/appendTo/
Insert every element in the set of matched elements to the end of the target.
The element to which the elements in the current selection set should be appended.
A new CQ object containing the target elements.
http://api.jquery.com/appendTo/
Insert every element in the set of matched elements to the end of the target.
The targets to which the current selection will be appended.
A new CQ object containing the target elements.
http://api.jquery.com/appendTo/
Get the value of an attribute for the first element in the set of matched elements.
The name of the attribute to get.
A string of the attribute value, or null if the attribute does not exist.
http://api.jquery.com/attr/#attr1
Get the value of an attribute for the first element in the set of matched elements.
This is a CsQuery extension. Attribute values are always stored as strings internally, in
line with their being created and represented as HTML string data. This method simplifies
converting to another type such as integer for attributes that represent strongly-type values.
Type to which the attribute value should be converted.
The name of the attribute to get.
A strongly-typed value representing the attribute, or default(T) if the attribute does not
exist.
Set one or more attributes for the set of matched elements.
Thrown when attemting to change the type of an INPUT element that already exists on the DOM.
THe attribute name.
The value to set.
The current CQ object.
Map an object to a set of attributes name/values and set those attributes on each object in
the selection set.
The jQuery API uses the same method "Attr" for a wide variety of purposes. For Attr and Css
methods, the overloads that we would like to use to match all the ways the method is used in
the jQuery API don't work out in the strongly-typed world of C#. To resolved this, the
methods AttrSet and CssSet were created for methods where an object or a string of JSON are
passed (a map) to set multiple methods.
An object whose properties names represent attribute names, or a string that is valid JSON
data that represents an object of attribute names/values.
The current CQ object.
http://api.jquery.com/attr/#attr2
Map an object to attributes, optionally using "quickSet" to set other properties in addition
to the attributes.
An object whose properties names represent attribute names, or a string that is valid JSON
data that represents an object of attribute names/values.
If true, set any css from a sub-map object passed with "css", html from "html", inner text
from "text", and css from "width" and "height" properties.
The current CQ object.
Remove an attribute from each element in the set of matched elements.
The attribute name to remove.
The current CQ object.
http://api.jquery.com/removeAttr/
Remove a property from the set of matched elements.
In CsQuery, there is no distinction between an attribute and a property. In a real browser
DOM, this method will actually remove a property from an element, causing consequences such
as the inability to set it later. In CsQuery, the DOM is stateless and is simply a
representation of the HTML that created it. This method is included for compatibility, but
causes no special behavior.
The property (attribute) name to remove.
The current CQ object.
http://api.jquery.com/removeProp/
Insert content, specified by the parameter, before each element in the set of matched
elements.
A CSS selector that determines the elements to insert.
The current CQ object.
http://api.jquery.com/before/
Insert the element, specified by the parameter, before each element in the set of matched
elements.
The element to insert.
The current CQ object.
http://api.jquery.com/before/
Insert each element, specified by the parameter, before each element in the set of matched
elements.
The elements to insert.
The current CQ object.
http://api.jquery.com/before/
Insert content, specified by the parameter, after each element in the set of matched elements.
A CSS selector that determines the elements to insert.
The current CQ object.
http://api.jquery.com/after/
Insert an element, specified by the parameter, after each element in the set of matched
elements.
The element to insert.
The current CQ object.
http://api.jquery.com/after/
Insert elements, specified by the parameter, after each element in the set of matched
elements.
The elements to insert.
The current CQ object.
http://api.jquery.com/after/
Inserts an element at the specified offset from a target. Helper method for Before and After.
Target for the.
The offset.
.
Insert every element in the selection at or after the index of each target (adding offset to
the index). If there is more than one target, the a clone is made of the selection for the
2nd and later targets.
This is a helper for Before and After. There is special handling when the target is not part
of a DOM. Instead of altering the DOM, this method will alter the selection set, and return a
CQ object that contains the new sequence. Normally, it would return the same CQ object (but
alter the DOM).
The target element.
The offset from the target at which to begin inserting.
[out] The inserted elements.
The current CQ object.
Get the first ancestor element that matches the selector, beginning at the current element
and progressing up through the DOM tree.
A CSS selector.
A new CQ object.
http://api.jquery.com/closest/#closest1
Return the element passed by parameter, if it is an ancestor of any elements in the selection
set.
The element to target.
A new CQ object.
http://api.jquery.com/closest/#closest1
Get the first ancestor element of any element in the seleciton set that is also one of the
elements in the sequence passed by parameter, beginning at the current element and
progressing up through the DOM tree.
The elements to target.
A new CQ object.
http://api.jquery.com/closest/#closest1
Add the previous set of elements on the stack to the current set.
A new CQ object.
http://api.jquery.com/andself/
Get the children of each element in the set of matched elements, optionally filtered by a
selector.
A selector that must match each element returned.
A new CQ object.
http://api.jquery.com/children/
Return all children of all selected elements. Helper method for Children()
A new sequence.
Create a deep copy of the set of matched elements. Clone makes copies of the actual elements
in a selection set; it doesn't simply make a copy of a selector's results.
A new CQ object that contains a clone of each element in the original selection set.
http://api.jquery.com/clone/
Get the children of each element in the set of matched elements, including text and comment
nodes.
A new CQ object.
http://api.jquery.com/contents/
Get the parent of each element in the current set of matched elements, optionally filtered by
a selector.
A string containing a selector expression to match elements against.
A new CQ object
http://api.jquery.com/parents/
Map each property of the objects in sources to the target object. Returns an expando object
(either the target object, if it's an expando object, or a new expando object)
.
.
.
Map each property of the objects in sources to the target object. Returns an expando object
(either the target object, if it's an expando object, or a new expando object)
true to deep.
.
.
.
Map each element of the result set to a new form. If a value is returned from the function,
the element will be excluded.
.
.
.
An enumerator that allows foreach to be used to process map< t> in this collection.
Map each element of the result set to a new form. If a value is returned from the function,
the element will be excluded.
Generic type parameter.
.
An enumerator that allows foreach to be used to process map< t> in this collection.
Get the ancestors of each element in the current set of matched elements, up to but not
including any element matched by the selector, optionally filtered by another selector.
A string containing a selector expression to match elements against.
(optional) a selector which limits the elements returned.
A new CQ object.
http://api.jquery.com/parentsUntil/
Get the ancestors of each element in the current set of matched elements, up to but not
including the element matched by the selector.
The element.
(optional) a selector which limits the elements returned.
A new CQ object.
http://api.jquery.com/parentsUntil/
Get the ancestors of each element in the current set of matched elements, up to but not
including any element matched by the selector, optionally filtered by another selector.
The elements.
(optional) a selector which limits the elements returned.
A new CQ object.
Reduce the set of matched elements to the first in the set.
A new CQ object containing the first element in the set, or no elements if the source was
empty.
http://api.jquery.com/first/
Reduce the set of matched elements to the last in the set.
A new CQ object containing the last element in the set, or no elements if the source was
empty.
http://api.jquery.com/last/
Reduce the set of matched elements to the one at the specified index.
The zero-based index within the current selection set to match.
A new CQ object.
http://api.jquery.com/eq/
End the most recent filtering operation in the current chain and return the set of matched
elements to its previous state.
The CQ object at the root of the current chain, or a new, empty selection if this CQ object
is the direct result of a Create()
http://api.jquery.com/end/
Description: Get the siblings of each element in the set of matched elements, optionally
filtered by a selector.
A selector used to filter the siblings.
A new CQ object.
http://api.jquery.com/siblings/
Return all the siblings of each element in the sequence.
The elements.
An enumerator that exposes each sibling of each element passed.
Set the CSS width of each element in the set of matched elements.
There is no Width() method in CsQuery because this is a value calculated by the browser.
While we can set the CSS of an element, it would be futile to try to return a useful value.
If you want to inspect the current CSS width for an element, please use Css() methods
instead. This ensures there is no confusion about the use of Width() in CsQuery.
An integer representing the number of pixels.
The current CQ object.
http://api.jquery.com/width/#width2
Set the CSS width of each element in the set of matched elements.
There are no Height() or Width() methods in CsQuery because these are value calculated by
the browser that depend on the page layout, as well as things like the browser window size
which don't even exist in CsQuery. While we can set the CSS of an element, it would be futile
to try to return a useful value. If you want to inspect the current CSS width for an element,
please use Css() methods instead. This ensures there is no confusion about the use of Width()
and Height()
in CsQuery.
An integer along with a unit of measure appended (as a string), e.g. "100px".
The current CQ object.
http://api.jquery.com/width/#width2
Set the CSS width of each element in the set of matched elements.
There are no Height() or Width() methods in CsQuery because these are value calculated by
the browser that depend on the page layout, as well as things like the browser window size
which don't even exist in CsQuery. While we can set the CSS of an element, it would be futile
to try to return a useful value. If you want to inspect the current CSS width for an element,
please use Css() methods instead. This ensures there is no confusion about the use of Width()
and Height()
in CsQuery.
An integer representing the number of pixels.
The current CQ object.
http://api.jquery.com/height/#height2
Set the CSS height of each element in the set of matched elements.
There are no Height() or Width() methods in CsQuery because these are value calculated by
the browser that depend on the page layout, as well as things like the browser window size
which don't even exist in CsQuery. While we can set the CSS of an element, it would be futile
to try to return a useful value. If you want to inspect the current CSS width for an element,
please use Css() methods instead. This ensures there is no confusion about the use of Width()
and Height()
in CsQuery.
An integer along with a unit of measure appended (as a string), e.g. "100px".
The current CQ object.
http://api.jquery.com/height/#height2
Check the current matched set of elements against a selector and return true if at least one
of these elements matches the selector.
A string containing a selector expression to match elements against.
true if at least one element in the selection set matches.
http://api.jquery.com/is/
Check the current matched set of elements against a sequence of elements, or another CQ
object, and return true if at least one of these elements matches the selector.
A sequence of elements or a CQ object to match against the current selection set.
true if the sequence matches, false if it fails.
http://api.jquery.com/is/
Check the current matched set of elements against an element, and return true if the element
is found within the selection set.
An element to match against the current selection set.
true if it is found, false if it fails.
http://api.jquery.com/is/
Get the current value of the first element in the set of matched elements, and try to convert
to the specified type.
The type to which the value should be converted.
A value or object of type T.
http://api.jquery.com/val/#val1
Gets the current value of the first element in the selection set, converted to the specified
type, or if the selection set is empty, the default value for the specified type.
The type to which the value should be converted.
A value or object of type T.
http://api.jquery.com/val/#val1
Get the current value of the first element in the set of matched elements. When using Val()
to access an OPTION group with the "multiple" flag set, this method with return a comma-
separated string (rather than the array returned by jQuery) of each selected option. When
there is no "value" property on an option, the text returned for the value of each selected
option is the inner text of the OPTION element.
A string of the value.
http://api.jquery.com/val/#val1
Set the value of each element in the set of matched elements. If a comma-separated value is
passed to a multiple select list, then it will be treated as an array.
A string of text or an array of strings corresponding to the value of each matched element to
set as selected/checked.
The current CQ object.
http://api.jquery.com/val/#val2
Returns: null if the value is null; if it's sequence, the concatenated string of each
object's ToString(); or finally the object itself its string representation if not a string.
The object to process
The value string.
Replace the target, which is the result of the selector passed, with the set of matched
elements.
A selector expression indicating which element(s) to replace.
The current CQ object
http://api.jquery.com/replaceAll/
Replace the target element with the set of matched elements.
An element.
The current CQ object.
http://api.jquery.com/replaceAll/
Replace each target element with the set of matched elements.
The targets to be replaced.
The current CQ object.
http://api.jquery.com/replaceAll/
Replace each element in the set of matched elements with the provided new content.
The HTML string of the content to insert.
The current CQ object
http://api.jquery.com/replaceWith/
Replace each element in the set of matched elements with the element passed by parameter.
The element to replace the content with.
The current CQ object.
http://api.jquery.com/replaceWith/
Replace each element in the set of matched elements with the sequence of elements or CQ
object provided.
The new conent to replace the selection set content with.
The current CQ object.
http://api.jquery.com/replaceWith/
Remove all classes from each element in the set of matched elements.
The current CQ object.
http://api.jquery.com/removeClass/
Remove one or more classess from each element in the set of matched elements.
One or more space-separated classes to be removed from the class attribute of each matched
element.
The current CQ object.
Remove all selected elements from the Document.
A selector expression that filters the set of matched elements to be removed.
The current CQ object.
http://api.jquery.com/remove/
This is synonymous with Remove in CsQuery, since there's nothing associated with an element
that is not rendered. It is included for compatibility.
CsQuery does not maintain data such as initial visibility state when using Show/Hide, or an
internal data structure when using Data methods. There is no data associated with an element
that is not represented entirely through the markup that it will render. In the future, it's
possible we may add such functionality for certain features, so it may be desirable to use
Detach instead of Remove in those situations. This ensures forward compatibility.
A selector expression that filters the set of matched elements to be removed.
A new CQ object.
Return the active selection set.
An sequence of IDomObject elements representing the current selection set.
http://api.jquery.com/get/
Return a specific element from the selection set.
The zero-based index of the element to be returned.
An IDomObject.
http://api.jquery.com/get/
Get the immediately preceding sibling of each element in the set of matched elements,
optionally filtered by a selector.
A string containing a selector expression to match elements against.
A new CQ object
http://api.jquery.com/prev/
Get the immediately following sibling of each element in the set of matched elements. If a
selector is provided, it retrieves the next sibling only if it matches that selector.
A string containing a selector expression to match elements against.
A new CQ object.
http://api.jquery.com/next/
Get all following siblings of each element in the set of matched elements, optionally
filtered by a selector.
A selector that must match each element returned.
A new CQ object
http://api.jquery.com/nextAll/
Get all following siblings of each element up to but not including the element matched by the
selector, optionally filtered by a selector.
A selector that must match each element returned.
A selector use to filter each result
A new CQ object
http://api.jquery.com/nextUntil/
Get all preceding siblings of each element in the set of matched elements, optionally
filtered by a selector.
A selector that must match each element returned.
A new CQ object
http://api.jquery.com/prevAll/
Get all preceding siblings of each element up to but not including the element matched by the
selector, optionally filtered by a selector.
A selector that must match each element returned.
A selector use to filter each result.
A new CQ object.
http://api.jquery.com/prevUntil/
Remove all child nodes of the set of matched elements from the DOM.
The current CQ object.
http://api.jquery.com/empty/
Set one or more properties for the set of matched elements.
The property to set
The value
The current CQ object
Test whether the named property is set for the first element in the selection set.
When used to test the "selected" property of options in option groups, and none are
explicitly marked as "selected", this will return "true" for the first option in the group,
per browser DOM behavior.
The property name.
true if it is set, false if not.
Helper function for Attr & Prop. Sets a property to true or false for an object that is
"truthy" or not.
The property name.
.The value.
Reduce the set of matched elements to a subset beginning with the 0-based index provided.
The 0-based index at which to begin selecting.
A new CQ object.
http://api.jquery.com/slice/
Reduce the set of matched elements to a subset specified by a range of indices.
The 0-based index at which to begin selecting.
The 0-based index of the element at which to stop selecting. The actual element at this
position is not included in the result.
A new CQ object.
http://api.jquery.com/slice/
Insert every element in the set of matched elements after the target.
Inserts an after described by target.
The target to insert after.
The current CQ object.
http://api.jquery.com/insertAfter/
Insert every element in the set of matched elements after each element in the target sequence.
If there is a single element in the target, the elements in the selection set will be moved
before the target (not cloned). If there is more than one target element, however, cloned
copies of the inserted element will be created for each target after the first, and that new
set (the original element plus clones) is returned.
A sequence of elements or a CQ object.
The set of elements inserted, including the original elements and any clones made if there
was more than one target.
http://api.jquery.com/insertAfter/
Insert every element in the set of matched elements after the target.
If there is a single element in the resulting set of the selection created by the parameter
selector, then the original elements in this object's selection set will be moved before it.
If there is more than one target element, however, cloned copies of the inserted element will
be created for each target after the first, and that new set (the original element plus
clones) is returned.
A selector identifying the target elements after which each element in the current set will
be inserted.
The set of elements inserted, including the original elements and any clones made if there
was more than one target.
http://api.jquery.com/insertAfter/
Insert every element in the set of matched elements before each elemeent in the selection set
created from the target selector.
If there is a single element in the resulting set of the selection created by the parameter
selector, then the original elements in this object's selection set will be moved before it.
If there is more than one target element, however, cloned copies of the inserted element will
be created for each target after the first, and that new set (the original element plus
clones) is returned.
A selector. The matched set of elements will be inserted before the element(s) specified by
this selector.
The set of elements inserted, including the original elements and any clones made if there
was more than one target.
http://api.jquery.com/insertBefore/
Insert every element in the set of matched elements before the target.
The element to which the elements in the current selection set should inserted after.
The current CQ object
http://api.jquery.com/insertBefore/
Insert every element in the set of matched elements before the target.
If there is a single element in the target, the elements in the selection set will be moved
before the target (not cloned). If there is more than one target element, however, cloned
copies of the inserted element will be created for each target after the first, and that new
set (the original element plus clones) is returned.
A sequence of elements or a CQ object that is the target; each element in the selection set
will be inserted after each element in the target.
The set of elements inserted, including the original elements and any clones made if there
was more than one target.
http://api.jquery.com/insertBefore/
Support for InsertAfter and InsertBefore. An offset of 0 will insert before the current
element. 1 after.
The target object
The offset from the targe object to insert
The current CQ object
Search for a given element from among the matched elements.
The index of the element, or -1 if it was not found.
http://api.jquery.com/index/
Returns the position of the current selection within the new selection defined by "selector".
The selector string.
The zero-based index of the selection within the new selection
http://api.jquery.com/index/
Returns the position of the element passed in within the selection set.
The element to exclude.
The zero-based index of "element" within the selection set, or -1 if it was not a member of
the current selection.
http://api.jquery.com/index/
Returns the position of the first element in the sequence passed by parameter within the
current selection set..
The element to look for.
The zero-based index of the first element in the sequence within the selection.
Return the relative position of an element among its Element siblings (non-element nodes excluded)
Hide the matched elements.
The jQuery docs say "This is roughly equivalent to calling .css('display', 'none')." With
CsQuery, it is exactly equivalent. Unlike jQuery, CsQuery does not store the current value of
the "display" style and restore it, because there is no concept of "effective style" in
CsQuery. We don't attempt to calculate the actual style that would be in effect since we
don't do any style sheet parsing. Instead, this method really just sets display: none. When
showing again, any "display" style is removed.
This means if you were to assign a non-default value for "display" such as "inline" to a div,
then Hide(), then Show(), it would no longer be displayed inline, as it would in jQuery.
Since CsQuery is not used interactively (yet, anyway), this sequence of events seems unlikely,
and supporting it exactly as jQuery does seems unnecessary. This functionality could
certainly be added in the future.
The current CQ object.
http://api.jquery.com/hide/
Display the matched elements.
This method simply removes the "display: none" css style, if present. See
for an explanation of how this differs from jQuery.
The current CQ object.
http://api.jquery.com/show/
Display or hide the matched elements.
The curren CQ object.
http://api.jquery.com/toggle/
Display or hide the matched elements based on the value of the parameter.
true to show the matched elements, or false to hide them.
The current CQ object.
http://api.jquery.com/toggle/
Select elements and return a new CSQuery object.
The "Select" method is the default CsQuery method. It's overloads are identical to the
overloads of the CQ object's property indexer (the square-bracket notation) and it functions
the same way. This is analogous to the default jQuery method, e.g. $(...).
A string containing a selector expression.
A new CQ object.
http://api.jquery.com/jQuery/#jQuery1
Return a new CQ object wrapping an element.
The element to wrap.
A new CQ object.
http://api.jquery.com/jQuery/#jQuery1
Return a new CQ object wrapping a sequence of elements.
The elements to wrap
A new CQ object.
http://api.jquery.com/jQuery/#jQuery1
Select elements from within a context.
A string containing a selector expression.
The point in the document at which the selector should begin matching; similar to the context
argument of the CQ.Create(selector, context) method.
A new CQ object.
http://api.jquery.com/jQuery/#jQuery1
Select elements from within a context.
A string containing a selector expression.
The points in the document at which the selector should begin matching; similar to the
context argument of the CQ.Create(selector, context) method. Only elements found below the
members of the sequence in the document can be matched.
A new CQ object.
http://api.jquery.com/jQuery/#jQuery1
Reduce the set of matched elements to those that match the selector or pass the function's
test.
A string containing a selector expression to match the current set of elements against.
A new CQ object.
http://api.jquery.com/filter/
Reduce the set of matched elements to those that matching the element passed by parameter.
The element to match.
A new CQ object.
http://api.jquery.com/filter/
Reduce the set of matched elements to those matching any of the elements in a sequence passed
by parameter.
The elements to match.
A new CQ object.
http://api.jquery.com/filter/
Reduce the set of matched elements to those that match the selector or pass the function's
test.
This method doesn't offer anything that can't easily be accomplished with a LINQ "where"
query but is included for completeness.
A function used as a test for each element in the set.
A new CQ object.
http://api.jquery.com/filter/
Reduce the set of matched elements to those that match the selector or pass the function's
test.
This method doesn't offer anything that can't easily be accomplished with a LINQ "where"
query but is included for completeness.
A function used as a test for each element in the set.
A new CQ object.
http://api.jquery.com/filter/
Get the descendants of each element in the current set of matched elements, filtered by a
selector.
A string containing a selector expression to match elements against.
A new CQ object.
http://api.jquery.com/find/
Get the descendants of each element in the current set of matched elements, filtered by a
sequence of elements or CQ object.
The elements to match against.
A new CQ object.
http://api.jquery.com/find/
Get a single element, if it is a descendant of the current selection set.
The element to matc.
A new CQ object.
http://api.jquery.com/find/
Iterate over each matched element, calling the delegate passed by parameter for each element.
If the delegate returns false, the iteration is stopped.
The overloads of Each the inspect the return value have a different method name (EachUntil)
because the C# compiler will not choose the best-matchine method when passing method groups.
See: http://stackoverflow.com/questions/2057146/compiler-ambiguous-invocation-error-anonymous-
method-and-method-group-with-fun.
A function delegate returning a boolean, and accepting an integer and an IDomObject
parameter. The integer is the zero-based index of the current iteration, and the IDomObject
is the current element.
The current CQ object.
http://api.jquery.com/each/
Iterate over each matched element, calling the delegate passed by parameter for each element.
If the delegate returns false, the iteration is stopped.
The overloads of Each the inspect the return value have a different method name (EachUntil)
because the C# compiler will not choose the best-matchine method when passing method groups.
See: http://stackoverflow.com/questions/2057146/compiler-ambiguous-invocation-error-anonymous-
method-and-method-group-with-fun.
A function delegate returning a boolean.
The current CQ object.
http://api.jquery.com/each/
Iterate over each matched element, calling the delegate passed by parameter for each element
A delegate accepting a single IDomObject paremeter
The current CQ object.
http://api.jquery.com/each/
Iterate over each matched element, calling the delegate passed by parameter for each element.
A delegate accepting an integer parameter, and an IDomObject paremeter. The integer is the
zero-based index of the current iteration.
The current CQ object.
http://api.jquery.com/each/
Iterate over each element in a sequence, and call a delegate for each element
Returns all values at named data store for the first element in the jQuery collection, as set
by data(name, value). Put another way, this method constructs an object based on the names
and values of any attributes starting with "data-".
A dynamic object.
http://api.jquery.com/data/#data2
Store arbitrary data associated with the specified element, and render it as JSON on the
element in a format that can be read by the jQuery "Data()" methods.
The name of the key to associate with this data object.
An string to be associated with the key.
The current CQ object.
http://api.jquery.com/data/#data1
Store arbitrary data associated with the specified element, and render it as JSON on the
element in a format that can be read by the jQuery "Data()" methods.
Though the jQuery "Data" methods are designed to read the HTML5 "data-" attributes like the
CsQuery version, jQuery Data keeps its data in an internal data store that is unrelated to
the element attributes. This is not particularly necessary when working in C# since you have
many other framework options for managing data. Rather, this method has been implemented to
simplify passing data back and forth between the client and server. You should be able to use
CsQuery's Data methods to set arbitrary objects as data, and read them directly from the
client using the jQuery data method. Bear and mind that because CsQuery intends to write
every object you assign using "Data" as a JSON string on a "data-" attribute, there's a lot
of conversion going on which will probably have imperfect results if you just try to use it
as a way to attach an object to an element. It's therefore advised that you think of it as a
way to get data to the client primarily.
The name of the key to associate with this data object.
An string containing properties to be mapped to JSON data.
The current CQ object.
http://api.jquery.com/data/#data1
Convert an object to JSON and stores each named property as a data element.
Because of conflicts with the overloaded signatures compared to the jQuery API, the general
Data method that maps an entire object has been implemented as DataSet.
Though the jQuery "Data" methods are designed to read the HTML5 "data-" attributes like the
CsQuery version, jQuery Data keeps its data in an internal data store that is unrelated to
the element attributes. This is not particularly necessary when working in C# since you have
many other framwork options for managing data. Rather, this method has been implemented to
simplify passing data back and forth between the client and server. You should be able to use
CsQuery's Data methods to set arbitrary objects as data, and read them directly from the
client using the jQuery data method. Bear and mind that because CsQuery intends to write
every object you assign using "Data" as a JSON string on a "data-" attribute, there's a lot
of conversion going on which will probably have imperfect results if you just try to use it
as a way to attach an object to an element. It's therefore advised that you think of it as a
way to get data to the client primarily.
An object containing properties which will be mapped to data attributes.
The current CQ object.
http://api.jquery.com/data/#data1
Returns an object or value at named data store for the first element in the jQuery collection,
as set by data(name, value).
The named key to identify the data, resulting in access to an attribute named "data-{key}".
An object representing the stored data. This could be a value type, or a POCO with properties
each containing other objects or values, depending on the data that was initially set.
http://api.jquery.com/data/#data2
Returns an object or value at named data store for the first element in the jQuery collection,
as set by data(name, value).
The type to which to cast the data. This type should match the type used when setting the
data initially, or be a type that is compatible with the JSON data structure stored in the
data attribute.
The name of the key to associate with this data object.
An object of type T.
http://api.jquery.com/data/#data2
Remove all data- attributes from the element.
The current CQ object.
http://api.jquery.com/removeData/
Remove a previously-stored piece of data identified by a key.
A string naming the piece of data to delete, or pieces of data if the string has multiple
values separated by spaces.
THe current CQ object.
http://api.jquery.com/removeData/
Remove all data from an element.
An array or space-separated string naming the pieces of data to delete.
The current CQ object.
http://api.jquery.com/removeData/
Returns data as a string, with no attempt to parse it from JSON. This is the equivalent of
using the Attr("data-{key}") method.
The key identifying the data.
A string.
Determine whether an element has any jQuery data associated with it.
true if there is any data, false if not.
http://api.jquery.com/jQuery.hasData/
Set one or more CSS properties for the set of matched elements from JSON data.
An object whose properties names represent css property names, or a string that is valid JSON
data that represents an object of css style names/values.
The current CQ object.
http://api.jquery.com/css/#css2
Set one or more CSS properties for the set of matched elements.
By default, this method will validate that the CSS style name and value are valid CSS3. To
assing a style without validatoin, use the overload of this method and set the "strict"
parameter to false.
The name of the style.
The value of the style.
The current CQ object.
http://api.jquery.com/css/#css2
Get the value of a style property for the first element in the set of matched elements, and
converts to a numeric type T. Any numeric type strings are ignored when converting to numeric
values.
The type. This should probably be a numeric type, but the method will attempt to convert to
any IConvertible type passed.
The name of the CSS style to retrieve.
A value of type T.
http://api.jquery.com/css/#css1
Get the value of a style property for the first element in the set of matched elements.
The name of the CSS style.
A string of the value of the named CSS style.
Get the HTML contents of the first element in the set of matched elements.
A string of HTML.
http://api.jquery.com/html/#html1
Set the HTML contents of each element in the set of matched elements. Any elements without
InnerHtml are ignored.
One or more strings of HTML markup.
The current CQ object.
http://api.jquery.com/html/#html2
Wrap an HTML structure around each element in the set of matched elements.
A string that is either a selector or a string of HTML that defines the structure to wrap
around the set of matched elements.
The current CQ object.
http://api.jquery.com/wrap/
Wrap an HTML structure around each element in the set of matched elements.
An element which is the structure to wrap around the selection set.
The current CQ object.
http://api.jquery.com/wrap/
Wrap an HTML structure around each element in the set of matched elements.
A sequence of elements that is the structure to wrap around the selection set. There may be
multiple elements but there should be only one innermost element in the sequence.
The current CQ object.
http://api.jquery.com/wrap/
Wrap an HTML structure around all elements in the set of matched elements.
A string that is either a selector or a string of HTML that defines the structure to wrap
around the set of matched elements.
The current CQ object.
http://api.jquery.com/wrapall/
Wrap an HTML structure around all elements in the set of matched elements.
An element which is the structure to wrap around the selection set.
The current CQ object.
http://api.jquery.com/wrapall/
Wrap an HTML structure around all elements in the set of matched elements.
A sequence of elements that is the structure to wrap around each element in the selection
set. There may be multiple elements but there should be only one innermost element in the
sequence.
The current CQ object.
http://api.jquery.com/wrapall/
Remove the parents of the set of matched elements from the DOM, leaving the matched elements
in their place.
The current CQ object.
http://api.jquery.com/unwrap/
Wrap an HTML structure around the content of each element in the set of matched elements.
An HTML snippet or elector expression specifying the structure to wrap around the content of
the matched elements.
The current CQ object
http://api.jquery.com/wrapinner/
Wrap an HTML structure around the content of each element in the set of matched elements.
A sequence of elements that is the structure to wrap around the content of the selection set.
There may be multiple elements but there should be only one innermost element in the sequence.
The current CQ object.
http://api.jquery.com/wrapinner/
Wrap an HTML structure around the content of each element in the set of matched elements.
A sequence of elements that is the structure to wrap around the content of the selection set.
There may be multiple elements but there should be only one innermost element in the sequence.
The current CQ object.
http://api.jquery.com/wrapinner/
Ouptuts the deepest-nested object, it's root element from the list of elements passed, and
returns the depth, given a structure. Helper method for Wrap.
The sequence to analyze
[ouy] The innermost element container
[out] The root element.
The innermost container.
Insert every element in the set of matched elements to the beginning of the target.
One or more HTML strings that will be targeted.
A CQ object containing all the elements added
http://api.jquery.com/prependTo/
Insert every element in the set of matched elements to the beginning of the target.
The targets to which the current selection will be appended.
A new CQ object representing the target elements.
http://api.jquery.com/prependTo/
Insert content, specified by the parameter, to the beginning of each element in the set of
matched elements.
One or more elements.
A new CQ object representing the inserte content.
http://api.jquery.com/prepend/
Insert content, specified by the parameter, to the beginning of each element in the set of
matched elements.
One or more selectors or HTML strings.
The current CQ object.
http://api.jquery.com/prepend/
Insert content, specified by the parameter, to the beginning of each element in the set of
matched elements.
The elements to be inserted.
The current CQ object.
http://api.jquery.com/prepend/
Insert content, specified by the parameter, to the beginning of each element in the set of
matched elements.
The elements to be inserted.
A CQ object containing all the elements added.
The current CQ object.
http://api.jquery.com/prepend/
Get the combined text contents of each element in the set of matched elements, including
their descendants.
A string containing the text contents of the selection.
http://api.jquery.com/text/#text1
Set the content of each element in the set of matched elements to the specified text.
A string of text.
The current CQ object.
http://api.jquery.com/text/#text2
Set the content of each element in the set of matched elements to the text returned by the
specified function delegate.
A delegate to a function that returns an HTML string to insert at the end of each element in
the set of matched elements. Receives the index position of the element in the set and the
old HTML value of the element as arguments. The function can return any data type, if it is not
a string, it's ToString() method will be used to convert it to a string.
The current CQ object.
http://api.jquery.com/text/#text2
Helper for public Text() function to act recursively.
.
.
Get the combined text contents of this and all child elements.
The StribgBuilder object to write to
The object.
Sets a child text for this element, using the text node type appropriate for this element's type
The element to add text to
The text.
Reduce the set of matched elements to those that have a descendant that matches the selector
or DOM element.
A valid CSS/jQuery selector.
A new CQ object.
http://api.jquery.com/has/
Reduce the set of matched elements to those that have the element passed as a descendant.
The element to match.
A new CQ object.
http://api.jquery.com/has/
Reduce the set of matched elements to those that have each of the elements passed as a descendant.
The elements to be excluded.
A new CQ object
http://api.jquery.com/has/
Remove elements from the set of matched elements.
A CSS selector.
A new CQ object.
http://api.jquery.com/not/
Selects all elements except the element passed as a parameter.
The element to exclude.
A new CQ object.
http://api.jquery.com/not/
Selects all elements except those passed as a parameter.
The elements to be excluded.
A new CQ object.
http://api.jquery.com/not/
Get the ancestors of each element in the current set of matched elements, optionally filtered
by a selector.
(optional) a selector which limits the elements returned.
A new CQ object.
http://api.jquery.com/parents/
Returns the HTML of each selected element in order.
A string of HTML
Returns an enumeration of the current selection set for this CQ object
The enumerator.
Clear the entire object.
Clears the current selection set.
Sets the selection set for this object, and asserts that the order in which it as assigned is
the order passed. This allows most operations to return the original set directly; if it is
requested in a different order then it will be sorted.
The current selection set including all node types.
The order in which the elements appear in selectionSet. If omitted, Ascending is the default.
The default output order, if different from the inputOrder. If omitted, the same as the input
order is the default.
The current CQ object.
Sets the selection set for this object to a single element..
The element to add.
The default output order. If omitted, Ascending (DOM) order is the default.
The current CQ object
Map a CSV or enumerable object to a hashset.
the object or sequence to map
A new hashset
Helper function for option groups to set multiple options when passed a CSV of values.
.
.
true to multiple.
Helper function for option groups to set multiple options when passed a CSV of values.
.
The values.
true to multiple.
Add an item to the list of selected elements. It should be part of this DOM.
The element to add
true if the element was added.
Adds each element to the current selection set.
The elements to add
true if any elements were added.
Map range of elements to a new CQ object using a function delegate to populate it.
Source elements
Delegate to the mapping function
A new CQ object
Runs a set of selectors and returns the combined result as a single enumerable.
A sequence of strings that area each selectors
An enumerator that allows foreach to be used to process merge selections in this collection.
Runs a set of HTML creation selectors and returns result as a single enumerable.
A sequence of strings that are each valid HTML
A new sequence containing all the elements from all the selectors.
Enumerates only the IDomElements in the sequence provided. Any other elemnent types are excluded..
The objects.
An enumerator that allows foreach to be used to process only elements in this collection.
Filter a sequence using a selector if the selector is not empty. If it's empty, return a new
CQ object containing the original list.
The selector.
The source sequence.
A new CQ object.
Filter a sequence using a selector if the selector is not empty. If it's empty, return a new CQ object
containing the original list.
The selector.
The source sequence
The order in which the elements of the new CQ object should be returned
A new CQ object
Filter a sequence using a selector, ignoring missing selectors
The sequence to filter
The selector.
An enumerator that allows foreach to be used to process filter elements in this collection.
Filter an element list using another selector. A null selector results in no filtering; an
empty string selector results in an empty list being return.
The sequence to filter.
The selector.
The filtered list.
Creates a new, empty CQ object.
Create a new CQ object from an HTML string.
The HTML source.
The HTML parsing mode.
(optional) options for controlling the parsing.
(optional) type of the document.
Create a new CQ object from an HTML stream.
The html source of the new document.
The character set encoding.
The HTML parsing mode.
(optional) options for controlling the parsing.
(optional) type of the document.
Create a new CQ object from an HTML string.
The html source of the new document.
The HTML parsing mode.
(optional) options for controlling the parsing.
(optional) type of the document.
Create a new CQ object wrapping a single element.
This differs from the method in that this document is still
related to its owning document; this is the same as if the element had just been selected.
The Create method, conversely, creates an entirely new Document context contining a single
element (a clone of this element).
The element.
Create a new CsQuery object wrapping an existing sequence of elements.
A sequence of elements to populate the object
Create a new CQ object wrapping a single DOM element, in the context of another CQ object.
This differs from the overload accepting a single IDomObject parameter in that it associates
the new object with a previous object, as if it were part of a selector chain. In practice
this will rarely make a difference, but some methods such as use
this information.
The element to wrap.
The context.
Create a new CsQuery object using an existing instance and a selector. if the selector is
null or missing, then it will contain no selection results.
A valid CSS selector.
The context.
Create a new CsQuery object from a selector HTML, and assign CSS from a JSON string, within a context.
The
The JSON containing CSS
The context
Create a new CsQuery object from a selector or HTML, and assign CSS, within a context.
The selector or HTML markup
The object whose property names and values map to CSS
The context
Create a new CsQuery object from a set of DOM elements, assigning the 2nd parameter as a context for this object.
The elements that make up the selection set in the new object
A CQ object that will be assigned as the context for this one.
Create a new CQ object from html.
A string of HTML
Bind this instance to a new empty DomDocument configured with the default options.
Bind this instance to a new empty DomFragment configured with the default options.
Bind this instance to a new DomFragment created from a sequence of elements.
The elements to provide the source for this object's DOM.
Bind this instance to a new DomFragment created from HTML in a specific HTML tag context.
The target.
The HTML.
The character set encoding.
The HTML parsing mode.
(optional) options for controlling the parsing.
(optional) type of the document.
Bind this instance to a new DomFragment created from HTML using the specified parsing mode and element context
The target.
The HTML.
The context (e.g. an HTML tag name)
(optional) type of the document.
Configures a new instance for a sequence of elements and an existing context.
The dom.
A sequence of elements.
The context.
Configures a new instance for a sequence of elements and an existing context.
A valid CSS selector.
The context.
Convert an object to JSON.
The obect to serialize.
A JSON formatted string.
Parse JSON into a typed object.
The target type of the object to create.
The JSON string to deserialize.
A new object of type T
Parse a JSON string into an expando object, or a json value into a primitive type.
The JSON string to deserialize.
A new object of type T
Parse a JSON string into an expando object, or a json value into a primitive type.
The JSON string to deserialize.
The type of object to create
A new object of the specified type
Convert a dictionary to a dynamic object. Use to get another expando object from a sub-
object of an expando object, e.g. as returned from JSON data.
The object.
obj as a JsObject.
Converts an object to a dynamic object of type T.
The type of object to create. This must be an IDynamicMetaObjectProvider that also implements
IDictionary<string,object>
The object.
A new object of type T.
Return a specific element from the selection set.
The zero-based index of the element to be returned.
An IDomObject.
http://api.jquery.com/get/.
Select elements and return a new CSQuery object.
The "Select" method is the default CsQuery method. It's overloads are identical to the
overloads of the CQ object's property indexer and it functions the same way. This is
analogous to the default jQuery method, e.g. $(...).
A string containing a selector expression.
A new CQ object.
http://api.jquery.com/jQuery/#jQuery1
Return a new CQ object wrapping an element.
The element to wrap.
A new CQ object.
http://api.jquery.com/jQuery/#jQuery1
Return a new CQ object wrapping a sequence of elements.
The elements to wrap.
A new CQ object.
http://api.jquery.com/jQuery/#jQuery1
Select elements from within a context.
A string containing a selector expression.
The point in the document at which the selector should begin matching; similar to the context
argument of the CQ.Create(selector, context) method.
A new CQ object.
http://api.jquery.com/jQuery/#jQuery1
Select elements from within a context.
A string containing a selector expression.
The points in the document at which the selector should begin matching; similar to the
context argument of the CQ.Create(selector, context) method. Only elements found below the
members of the sequence in the document can be matched.
A new CQ object.
http://api.jquery.com/jQuery/#jQuery1
The number of elements in the CQ object.
http://api.jquery.com/length/
Represents the full, parsed DOM for an object created with an HTML parameter. The Document is
the equivalent of the "document" in a browser. The Document node for a complete HTML document
should have only two children, the DocType node and the HTML node.
Returns the Document for this CQ object. This can also be an IDomFragment type, which is a
derived type of IDomDocument. This is mostly a useful distinction to determine
programatically how the CQ object was created and whether it's intended to represent a
complete HTML document, or only a partial fragment.
The selector (parsed) used to create this instance.
This is not guaranteed to have useful data, since CQ objects can be created indirectly and
not represent a selector. If this object was created directly from a selector, this will
contain the Selector object. The ToString() overload will show how the selector was parsed.
The entire selection set as a sequence of elements. This is the default enumerator for a CQ
object as well.
Returns only IDomElement objects from the current selection.
Gets or sets the order in which the selection set is returned. Usually, this is the order
that elements appear in the DOM. Some operations could result in a selection set that's in an
arbitrary order, though.
The object from which this CsQuery was created.
The current selection set including all node types.
DEPRECATED. Please use CsQuery.Config.DomRenderingOptions.
DEPRECATED. Please use CsQuery.Config.DocType
(Alpha) Provide simple user agent information.
Values that represent CSSRuleType.
An unknown rule.
A CSS Style rule.
A character set rule.
An import rule.
A media rule.
A font face rule.
A page rule.
Interface for icss rule.
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule
Gets the type of rule.
The parsable textual representation of the rule. This reflects the current state of the rule
and not its initial value.
The style sheet that contains this rule.
If this rule is contained inside another rule (e.g. a style rule inside an @media block),
this is the containing rule. If this rule is not nested inside any other rules, this returns
null.
Interface for a CSS style rule.
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule
The textual representation of the selector for the rule set. The implementation may have
stripped out insignificant whitespace while parsing the selector.
The declaration-block of this rule set.
Interface to a CSS style sheet.
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet
Indicates whether the style sheet is applied to the document.
If the style sheet is a linked style sheet, the value of its attribute is its location. For inline style sheets, the value of this attribute is null.
The node that associates this style sheet with the document. For HTML, this may be the
corresponding LINK or STYLE element.
This specifies the style sheet language for this style sheet. This will always be "text/css"
Gets the CSS rules for this style sheet.
Interface for icss rule.
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule
Constructor for a CSS rule.
The parent style sheet.
The parent rule.
Gets the type of rule.
The parsable textual representation of the rule. This reflects the current state of the rule
and not its initial value.
The style sheet that contains this rule.
The parent style sheet.
If this rule is contained inside another rule (e.g. a style rule inside an @media block),
this is the containing rule. If this rule is not nested inside any other rules, this returns
null.
The parent rule.
Arguments for when a style is changed.
Constructor.
A value indicating whether this object has styles following the change.
Gets a value indicating whether this object has styles following the change.
A CSS style rule.
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule
Constructor.
The parent style sheet.
The parent rule.
The textual representation of the selector for the rule set. The implementation may have
stripped out insignificant whitespace while parsing the selector.
The declaration-block of this rule set.
The parsable textual representation of the rule. This reflects the current state of the rule
and not its initial value.
A CSS style sheet.
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleSheet
Constructor.
The node that owns this item.
Indicates whether the style sheet is applied to the document.
If the style sheet is a linked style sheet, the value of its attribute is its location. For
inline style sheets, the value of this attribute is null.
The node that associates this style sheet with the document. For HTML, this may be the
corresponding LINK or STYLE element.
The owner node.
This specifies the style sheet language for this style sheet. This will always be "text/css".
The type.
Gets the CSS rules for this style sheet.
The CSS rules.
A STYLE element
HTML elements.
Base class for Dom object that contain other elements
Base class for anything that exists in the DOM
Something that appears in the DOM. This is essentially the same as a Node in the browser DOM,
but IDomObject represents only things that may appear in the DOM (e.g. not an attribute,
document, doctype)
An node that appears directly in the DOM. This is essentially synonymous with a Node, but it does
not include attributes.
All properties of Element nodes are implemented in IDomObject even though many are only applicable to
Elements. Attempting to read a property that doesn't exist on the node type will generally return 'null'
whereas attempting to write will throw an exception. This is intended to make coding against this model
the same as coding against the actual DOM, where accessing nonexistent properties is acceptable. Because
some javascript code actually uses this in logic we allow the same kind of access. It also eliminates the
need to cast frequently, for example, when accessing the results of a jQuery object by index.
Interface for a node. This is the most generic construct in the CsQuery DOM.
Renders the complete HTML for this element, including its children.
a string of HTML.
Renders the complete HTML for this element, including its children.
a string of HTML
Renders the complete HTML for this element, including its children, using the OutputFormatter.
a string of HTML
Renders the complete HTML for this element, including its children, using the OutputFormatter.
a string of HTML
Renders the complete HTML for this element to a StringBuilder. Note: This is obsolete; use Render(IOutputFormatter)
An existing StringBuilder instance to append this element's HTML.
Renders the complete HTML for this element, including its children, using the OutputFormatter.
An existing StringBuilder instance to append this element's HTML.
(optional) options for controlling the operation.
Removes this object from it's parent, and consequently the Document, if any, to which it belongs.
Makes a deep copy of this object.
A copy of this object.
Gets the type of the node.
The node (tag) name, in upper case.
https://developer.mozilla.org/en/DOM/Node.nodeName
Gets or sets the value of this node.
For the document itself, nodeValue returns null. For text, comment, and CDATA nodes,
nodeValue returns the content of the node.
https://developer.mozilla.org/en/DOM/Node.nodeValue
Gets a value indicating whether this object has any children. For node types that cannot have
children, it will always return false. To determine if a node is allowed to have children,
use the ChildrenAllowed property.
Gets zero-based index of this object relative to its siblings including all node types.
Return an INodeList of the direct children of this node.
Return a sequence containing only the element children of this node (e.g. no text, cdata, comments)
Gets a value indicating whether this node should be is indexed. Generally, this is true for IDomElement
nodes that are within an IDomDocument and false otherwise.
Gets a value indicating whether this object belongs to a Document or not.
Disconnected elements are not bound to a DomDocument object. This could be because
they were instantiated outside a document context, or were removed as a result of
an operation such as ReplaceWith.
Gets a value indicating whether this object belongs is a fragmment and is bound to an
IDomFragment object.
Adds a node to the end of the list of children of a specified parent node. If the node
already exists it is removed from current parent node, then added to new parent node.
The element to append.
https://developer.mozilla.org/en/DOM/Node.appendChild
Removes a child node from the DOM. Returns removed node.
The element to remove.
https://developer.mozilla.org/En/DOM/Node.removeChild
Inserts the specified node before a reference element as a child of the current node.
The node to insert.
The node before which the new node will be inserted.
https://developer.mozilla.org/en/DOM/Node.insertBefore
Inserts the specified node after a reference element as a child of the current node.
This is a CsQuery extension.
The new node to be inserted.
The node after which the new node will be inserted.
Adds a new boolean attribute or sets its value to true.
In HTML, some element attributes can be specified without a value, such as "checked" or
"multiple." These are not really attributes but rather the default values for element boolean
properties. CsQuery does not distinguish between properties and attributes since the DOM is
stateless, it only reflects the actual markup it represents. The real DOM, to the contrary,
can be changed through javascript. It would be possible for an element's property to be
different from the default value that is specified by its markup.
Because of this, we treat properties and attributes the same. A property is simply an
attribute with no specific value, it either exists or does not exist. This overload of
SetAttribute allows you to set a boolean attribute. You can use RemoveAttribute to unset it.
It is also possible to set an attribute to an empty string, e.g. with markup like
<div someAttr="">
The attribute name.
Adds a new attribute or changes the value of an existing attribute on the specified element.
Setting an attribute to null is the equivalent of using RemoveAttribute. Setting an attribute
to an empty string will cause it to be rendered as an empty value, e.g.
<div someAttr="">
If you want to set a boolean attribute that renders just as the attribute name, use
SetAttribute(name) overload. When using GetAttribute to inspect an attribute value, note that
both boolean and empty-string attributes will return an empty string. There is no way to determine
using GetAttribute if the atttribute was set as a boolean property, or an empty string.
The attribute name.
For input elements, the "value" property of this element. Returns null for other element
types.
https://developer.mozilla.org/en/DOM/element.setAttribute
Returns the value of the named attribute on the specified element. If the named attribute
does not exist, the value returned will be null. The empty string is returned for values that
exist but have no value.
If an attribute does not exist, this returns null. If an attribute was set as a boolean
property attribute, or the attribute has an empty string value, an empty string will be
returned. Note that an empty-string value for GetAttribute could result in an attribute
rendering as either a property, or an empty string value, e.g.
<div someAttr>
<div someAttr="">
There is no way to determine whether an attribute was set as a property or empty string other
than rendering. The internal data will match the way it was parsed from HTML, or the way it
was set. When set using SetAttribute(name) it will be displayed as a boolean
property; when set using SetAttribute(name,"") it will be displayed as an empty
string.
The attribute name.
The attribute value string.
https://developer.mozilla.org/en/DOM/element.getAttribute
Returns the value of the named attribute on the specified element. If the named attribute
does not exist, the value returned will be the provide "defaultValue".
This overload is a CsQuery extension.
The attribute name.
A string to return if the attribute does not exist.
The attribute value string.
Try to get a named attribute.
This overload is a CsQuery extension.
The attribute name.
The attribute value, or null if the named attribute does not exist.
true if the attribute exists, false if it does not.
Returns a boolean value indicating whether the specified element has the specified attribute or not.
The attribute name.
true if the named attribute exists, false if not.
https://developer.mozilla.org/en/DOM/element.hasAttribute
Removes an attribute from the specified element.
The attribute name.
true if it the attribute exists, false if the attribute did not exist. If the attribute
exists it will always be removed, that is, it is not possible for this method to fail unless
the attribute does not exist.
https://developer.mozilla.org/en/DOM/element.removeAttribute
Returns a boolean value indicating whether the named class exists on this element.
The class name for which to test.
true if the class is a member of this elements classes, false if not.
This is a CsQuery extension.
Adds the class.
The class name for which to test.
true if it succeeds, false if it fails.
Removes the named class from the classes defined for this element.
This method is a CsQuery extension.
The class name to remove.
true if the class exists and was removed from this element, false if the class did not exist.
If the class exists it will always be removed, that is, it is not possible for this method to
fail if the class exists.
Returns a boolean value indicating whether the named style is defined in the styles for this
element.
Name of the style to test.
true if the style is explicitly defined on this element, false if not.
Adds a style descriptor to this element, validating the style name and value against the CSS3
ruleset. The string should be of the form "styleName: styleDef;", e.g.
"width: 10px;"
The trailing semicolon is optional.
The style string.
Adds a style descriptor to this element, optionally validating against the CSS3 ruleset. The
default method always validates; this overload should be used if validation is not desired.
An object encapsulating the Styles associated with this element.
true to enforce validation of CSS3 styles.
Removes the named style from this element.
The style name.
true if the style exists and is removed, false if the style did not exist.
Return the total number of descendants of this element
int, the total number of descendants
Wrap this element in a CQ object. This is the CsQuery equivalent of the common jQuery
construct $(el). Since there is no default method in C# that we can use to create a similar
syntax, this method serves the same purpose.
A new CQ object wrapping this element.
Clone this element.
A copy of this element that is not bound to the original.
The HTML document to which this element belongs
The direct parent of this node
The child node at the specified index.
The zero-based index of the child node to access.
IDomObject, the element at the specified index within this node's children.
Get or set the value of the named attribute on this element.
The attribute name.
An attribute value.
Get or set value of the id attribute.
An interface to access the attributes collection of this element.
An object encapsulating the Styles associated with this element.
gets and sets the value of the class attribute of the specified element.
https://developer.mozilla.org/en/DOM/element.className
All the unique class names applied to this object.
A sequence of strings
For input elements, the "value" property of this element. Returns null for other element
types.
The value of an input element, or the text of a textarea element.
Gets or sets or gets the HTML of an elements descendants.
https://developer.mozilla.org/en/DOM/element.innerHTML
Gets or sets the outer HTML.
https://developer.mozilla.org/en-US/docs/DOM/element.outerHTML
Gets or sets the text content of a node and its descendants.
https://developer.mozilla.org/en/DOM/Node.textContent
Returns the node's first child in the tree, or null if the node is childless. If the node is a Document, it returns the first node in the list of its direct children.
https://developer.mozilla.org/en/DOM/element.firstChild
Returns the element's first child element or null if there are no child elements.
https://developer.mozilla.org/en/DOM/Element.firstElementChild
Returns the last child of a node.
https://developer.mozilla.org/en/DOM/Node.lastChild
Returns the element's last child element or null if there are no child elements.
https://developer.mozilla.org/en/DOM/Element.lastElementChild
Returns the node immediately following the specified one in its parent's childNodes list, or
null if the specified node is the last node in that list.
https://developer.mozilla.org/en/DOM/Node.nextSibling
Returns the node immediately preceding the specified one in its parent's childNodes list,
null if the specified node is the first in that list.
https://developer.mozilla.org/en/DOM/Node.previousSibling
Returns the element immediately following the specified one in its parent's children list,
or null if the specified element is the last one in the list.
https://developer.mozilla.org/en/DOM/Element.nextElementSibling
Returns the element immediately prior to the specified one in its parent's children list, or
null if the specified element is the first one in the list.
https://developer.mozilla.org/en/DOM/Element.previousElementSibling
Returns true if this node has any attributes.
Returns true if this node has CSS classes.
Returns true if this node has any styles defined.
Indicates whether the element is selected or not. This value is read-only. To change the
selection, set either the selectedIndex or selectedItem property of the containing element.
In CsQuery, this property simply indicates the presence of a "selected" attribute. The
accompanying "SelectedIndex" and "SelectedItem" properties have not been implemented as of
this writing.
https://developer.mozilla.org/en/XUL/Attribute/selected
Gets or sets a value indicating whether the element is checked.
In CsQuery, this property simply indicates the presence of a "checked" attribute.
https://developer.mozilla.org/en/XUL/Property/checked
Gets or sets a value indicating whether the only should be read.
In CsQuery, this property simply indicates the presence of a "readonly" attribute.
https://developer.mozilla.org/en/XUL/Property/readOnly
The value of the "type" attribute. For input elements, this property always returns a
lowercase value and defaults to "text" if there is no type attribute. For other element types,
it simply returns the value of the "type" attribute.
https://developer.mozilla.org/en/XUL/Property/type
Gets or sets the name attribute of an DOM object, it only applies to the following elements:
<a> , <applet> , <form> , <frame> , <iframe> , <img> ,
<input> , <map> , <meta> , <object> , <option> , <param> ,
<select> , and <textarea> .
https://developer.mozilla.org/en/DOM/element.name
Gets a value indicating whether HTML is allowed as a child of this element. It is possible
for this value to be false but InnerTextAllowed to be true for elements which can have inner
content, but no child HTML markup, such as <textarea> and <script>
Gets a value indicating whether text content is allowed as a child of this element.
DEPRECATED 7-1-2012, PLEASE USE ChildrenAllowed(). This will be removed in a future release.
Gets a value indicating whether this element may have children. When false, it means this is
a void element.
Gets the depth of this node relative to the Document node, which has depth zero.
Gets a unique ID for this element among its siblings
Gets the full pathname of the node file.
Gets the unique path to this element from the root of the heirarchy. This is generally only
used for internal purposes.
Gets the full pathname of the node file.
The internal token ID for this element's node name.
A reference to the owning document. This is also the topmost node in the tree.
Backing property for index.
The parent node. Do not expose this. _ParentNode should only be managed by the ParentNode
property.
The implementation for Clone.
A clone of this object.
Information describing metadata about the element's owning document. This is essentially a
cache, it prevents us from having to check to see if there's an owning document and access it
directly. This is an optimizaton as this happens often.
Gets the full path to this document.
The path.
Gets the full path to this document.
The path.
Gets the depth of the current node.
The depth.
Renders the complete HTML for this element, including its children.
a string of HTML.
Renders the complete HTML for this element, including its children, using the specified
OutputFormatter.
The formatter that controls how the ouput is rendered.
The writer to which output should be written.
Renders the complete HTML for this element, including its children, using the specified
OutputFormatter.
The formatter.
a string of HTML.
Renders the complete HTML for this element, including its children.
a string of HTML
Renders the complete HTML for this element, including its children, using the OutputFormatter.
An existing StringBuilder instance to append this element's HTML.
Renders the complete HTML for this element to a StringBuilder. Note: This obsolete and will
be removed; please use Render(IOutputFormatter).
An existing StringBuilder instance to append this element's HTML.
(optional) options for controlling the operation.
Wrap this element in a CQ object. This is the CsQuery equivalent of the common jQuery
construct $(el). Since there is no default method in C# that we can use to create a similar
syntax, this method serves the same purpose.
A new CQ object wrapping this element.
Clone this element.
A copy of this element that is not bound to the original.
Removes this object from it's parent, and consequently the Document, if any, to which it
belongs.
Thrown when the the node has no parent.
Return the total number of descendants of this element.
int, the total number of descendants.
Adds a node to the end of the list of children of a specified parent node. If the node
already exists it is removed from current parent node, then added to new parent node.
Thrown when the requested operation is invalid.
The element to append.
https://developer.mozilla.org/en/DOM/Node.appendChild
Appends a child without checking to see if its already a member of the DOM. For use in DOM
construction to avoid unneeded overhead.
Thrown when the requested operation is invalid.
The element to append.
Removes a child node from the DOM. Returns removed node.
Thrown when the requested operation is invalid.
The element to remove.
https://developer.mozilla.org/En/DOM/Node.removeChild
Inserts the specified node before a reference element as a child of the current node.
Thrown when the requested operation is invalid.
The node to insert.
The node before which the new node will be inserted.
https://developer.mozilla.org/en/DOM/Node.insertBefore
Inserts the specified node after a reference element as a child of the current node.
Thrown when the requested operation is invalid.
The new node to be inserted.
The node after which the new node will be inserted.
Adds a new boolean attribute or sets its value to true.
Thrown when the object type does not support attributes
The attribute name.
Adds a new attribute or changes the value of an existing attribute on the specified element.
Thrown when the object type does not support attributes
The attribute name.
For input elements, the "value" property of this element. Returns null for other element
types.
https://developer.mozilla.org/en/DOM/element.setAttribute
Returns the value of the named attribute on the specified element. If the named attribute
does not exist, the value returned will either be null or "" (the empty string)
The attribute name.
The attribute value string.
https://developer.mozilla.org/en/DOM/element.getAttribute
Returns the value of the named attribute on the specified element. If the named attribute
does not exist, the value returned will either be the provide "defaultValue".
The attribute name.
A string to return if the attribute does not exist.
The attribute value string.
Try to get a named attribute.
The attribute name.
The attribute value, or null if the named attribute does not exist.
true if the attribute exists, false if it does not.
Returns a boolean value indicating whether the specified element has the specified attribute
or not.
The attribute name.
true if the named attribute exists, false if not.
https://developer.mozilla.org/en/DOM/element.hasAttribute
Removes an attribute from the specified element.
Thrown when the requested operation is invalid.
The attribute name.
true if it the attribute exists, false if the attribute did not exist. If the attribute
exists it will always be removed, that is, it is not possible for this method to fail unless
the attribute does not exist.
https://developer.mozilla.org/en/DOM/element.removeAttribute
Returns a boolean value indicating whether the named class exists on this element.
The class name for which to test.
true if the class is a member of this elements classes, false if not.
Adds the class.
Thrown when the requested operation is invalid.
The class name for which to test.
true if it succeeds, false if it fails.
Removes the named class from the classes defined for this element.
Thrown when the requested operation is invalid.
The class name to remove.
true if the class exists and was removed from this element, false if the class did not exist.
If the class exists it will always be removed, that is, it is not possible for this method to
fail if the class exists.
Returns a boolean value indicating whether the named style is defined in the styles for this
element.
Name of the style to test.
true if the style is explicitly defined on this element, false if not.
Adds a style descriptor to this element, validating the style name and value against the CSS3
ruleset. The string should be of the form "styleName: styleDef;", e.g.
"width: 10px;"
The trailing semicolon is optional.
Thrown when the requested operation is invalid.
The style string.
Adds a style descriptor to this element, optionally validating against the CSS3 ruleset. The
default method always validates; this overload should be used if validation is not desired.
Thrown when the requested operation is invalid.
An object encapsulating the Styles associated with this element.
true to enforce validation of CSS3 styles.
Removes the named style from this element.
Thrown when the requested operation is invalid.
The style name.
true if the style exists and is removed, false if the style did not exist.
The ToString() override for an object depends on the type of element.
A that represents the current IDomObject.
An enumeration of clones of the chilren of this object
An enumerator
Returns the HTML for this element, but ignoring children/innerHTML.
A string of HTML
Enumerates index keys for this element.
Thrown when the requested operation is not valid for this element type
A sequence of keys
Updates the cached Document and property flags.
Updates the cached Document and property flags.
A reference to the owning document. This is also the topmost node in the tree.
Makes a deep copy of this object.
A copy of this object.
Makes a deep copy of this object.
A copy of this object.
Gets the type of the node.
Gets a value indicating whether this object has children.
Gets a value indicating whether HTML is allowed as a child of this element. It is possible
for this value to be false but InnerTextAllowed to be true for elements which can have inner
content, but no child HTML markup, such as <textarea> and <script>
Gets the identifier of the node name.
Gets a value indicating whether text content is allowed as a child of this element.
Gets a value indicating whether this element may have children. When false, it means this is
a void element.
Gets a value indicating whether this object type should be indexed.
The full path to this node. This is calculated by requesting the parent path and adding its
own ID.
Gets the unique path to this element as a string. THIS METHOD IS OBSOLETE. It has been replaced by NodePath.
The DOM for this object. This is obtained by looking at its parents value until it finds a
non-null Document in a parent. The value is cached locally as long as the current value of
Parent remains the same.
Gets or sets the text content of a node and its descendants.
Gets or sets or gets the HTML of an elements descendants.
Gets or sets the outer HTML.
https://developer.mozilla.org/en-US/docs/DOM/element.outerHTML
Gets the child nodes.
The direct parent of this node.
The element is not associated with an IDomDocument.
Gets a value indicating whether this object belongs to a Document or not.
Gets a unique ID for this element among its siblings. THIS METHOD IS OBSOLETE. It has been replaced by NodePath.
Gets a unique ID for this element among its siblings.
Gets the depth of the current node.
Gets the child elements.
The element's absolute index among its siblings.
The value of an input element, or the text of a textarea element.
Gets or sets the node value.
The value of the "type" attribute. For input elements, this property always returns a
lowercase value and defaults to "text" if there is no type attribute. For other element types,
it simply returns the value of the "type" attribute.
https://developer.mozilla.org/en/XUL/Property/type
Gets or sets the name attribute of an DOM object, it only applies to the following elements:
<a> , <applet> , <form> , <frame> , <iframe> , <img> ,
<input> , <map> , <meta> , <object> , <option> , <param> ,
<select> , and <textarea> .
https://developer.mozilla.org/en/DOM/element.name
Get or set value of the id attribute.
For input elements, the "value" property of this element. Returns null for other element
types.
gets and sets the value of the class attribute of the specified element.
A sequence of all unique class names defined on this element.
An interface to access the attributes collection of this element.
An object encapsulating the Styles associated with this element.
The node (tag) name, in upper case.
Returns the node's first child in the tree, or null if the node is childless. If the node is
a Document, it returns the first node in the list of its direct children.
https://developer.mozilla.org/en/DOM/element.firstChild
Returns the last child of a node.
https://developer.mozilla.org/en/DOM/Node.lastChild
Returns the element's first child element or null if there are no child elements.
https://developer.mozilla.org/en/DOM/Element.firstElementChild
Returns the element's last child element or null if there are no child elements.
https://developer.mozilla.org/en/DOM/Element.lastElementChild
Returns true if this node has any attributes.
Returns true if this node has CSS classes.
Returns true if this node has any styles defined.
Gets or sets a value indicating whether the element is checked.
https://developer.mozilla.org/en/XUL/Property/checked
Gets or sets a value indicating whether the only should be read.
https://developer.mozilla.org/en/XUL/Property/readOnly
Returns the node immediately following the specified one in its parent's childNodes list, or
null if the specified node is the last node in that list.
https://developer.mozilla.org/en/DOM/Node.nextSibling
Returns the node immediately preceding the specified one in its parent's childNodes list,
null if the specified node is the first in that list.
https://developer.mozilla.org/en/DOM/Node.previousSibling
Returns the element immediately following the specified one in its parent's children list, or
null if the specified element is the last one in the list.
https://developer.mozilla.org/en/DOM/Element.nextElementSibling
Returns the element immediately prior to the specified one in its parent's children list, or
null if the specified element is the first one in the list.
https://developer.mozilla.org/en/DOM/Element.previousElementSibling
The child node at the specified index.
The zero-based index of the child node to access.
IDomObject, the element at the specified index within this node's children.
The child node at the specified index.
The zero-based index of the child node to access.
IDomObject, the element at the specified index within this node's children.
The index excluding text nodes.
Gets a value indicating whether this object is a block element
Gets the object to which this index entry refers.
Indicates whether the element is selected or not. This value is read-only. To change the
selection, set either the selectedIndex or selectedItem property of the containing element.
https://developer.mozilla.org/en/XUL/Attribute/selected
Flags indicating particular states regarding the owning document.
The parent document is indexed.
The parent document is a document (not a fragment).
The parent document is valid.
The parent document has already been tested..
Strongly-typed interface for building typed subclasses of IDomObject.
Type of the out.
Clone this element.
A copy of this element that is not bound to the original.
Default constructor for the abstract class.
Makes a deep copy of this object.
A copy of this object.
This is called by the base class DomObject, and ensures that the typed Clone implementations
get called when the object is accessed through the IDomObject interface.
A new IDomObject
Interface for objects that can contain other objects. Note that to allow some consistency with how DOM
objects are used in the browser DOM, many methods are part of the base IDomObject interface so that they
can be used (and return null/missing data) on elements to which they don't apply. So in actuality the only
unique methods are nonstandard ones.
An enumeration of clones of the chilren of this object
An enumerator
Default constructor.
Constructor that populates the container with the passed elements.
The elements.
Appends a child.
The item.
Appends a child without checking if it already exists.c
The item.
Removes the child.
The item.
Inserts the new node before a reference node.
Thrown when the reference node isn't a child of this node.
The new node.
The reference node.
Inserts a new node after a reference node.
Thrown when the reference node isn't a child of this node.
The new node.
The reference node.
Gets the number of descendants of this element.
An integer.
Returns all children (including inner HTML as objects);
The child nodes as a concete object.
Gets a value indicating whether this object has children.
Returns the node's first child in the tree, or null if the node is childless. If the node is
a Document, it returns the first node in the list of its direct children.
https://developer.mozilla.org/en/DOM/element.firstChild
Returns the element's first child element or null if there are no child elements.
https://developer.mozilla.org/en/DOM/Element.firstElementChild
Returns the last child of a node.
https://developer.mozilla.org/en/DOM/Node.lastChild
Returns the element's last child element or null if there are no child elements.
https://developer.mozilla.org/en/DOM/Element.lastElementChild
Get all child elements
A regular DOM element
An marker and interface exposing properties required for a node that should be indexed
A sequence of all the index keys that can be used to access this object
An sequence of strings
The object that is the target of the index (normally, the object itself)
Returns the HTML for this element, but ignoring children/innerHTML.
A string of HTML.
The element is a block element.
Get this element's index only among other elements (e.g. excluding text & other non-
element node types)
Interface for methods to access the attributes on a DOM element.
Get the value of a named attribute
The attribute name
The attribute value
Set the value of a named attribute
Get or set the value of a named attribute
The attribute name
The attribute value
string
The number of attributes in this attribute collection. This includes special attributes such as
"class", "id", and "style"
int
The dom attributes.
Backing field for _Style.
Backing field for _Classes.
Backing field for NodeNameID property.
Default constructor.
Create a new DomElement node of a nodeTipe determined by a token ID.
Token represnting an existing tokenized node type.
Creates a new element
The NodeName for the element (upper case).
A new element that inherits DomElement
Returns the HTML for this element, but ignoring children/innerHTML.
A string of HTML
Returns all the keys that should be in the index for this item (keys for class, tag,
attributes, and id)
An enumerator that allows foreach to be used to process index keys in this collection.
Makes a deep copy of this object.
A copy of this object.
Enumerates clone children in this collection.
An enumerator that allows foreach to be used to process clone children in this collection.
Query if 'name' has style.
.
true if style, false if not.
Query if 'name' has class.
.
true if class, false if not.
Adds the class.
.
true if it succeeds, false if it fails.
Removes the class described by name.
.
true if it succeeds, false if it fails.
Query if 'tokenId' has attribute.
.
true if attribute, false if not.
Set the value of a named attribute.
.
.
Set the value of a named attribute.
.
.
Sets an attribute with no value.
The attribute name
Sets an attribute with no value.
The token
Used by DomElement to (finally) set the ID value.
THe attribute token
The attribute value
Removes the attribute described by name.
The attribute name to remove
true if it succeeds, false if it fails.
Removes the attribute described by name.
The token for the attribute
true if it succeeds, false if it fails.
Gets an attribute value, or returns null if the value is missing. If a valueless attribute is
found, this will also return null. HasAttribute should be used to test for such attributes.
Attributes with an empty string value will return String.Empty.
.
The attribute.
Gets an attribute value, or returns null if the value is missing. If a valueless attribute is
found, this will also return null. HasAttribute should be used to test for such attributes.
Attributes with an empty string value will return String.Empty.
.
The attribute.
Return an attribute value identified by name. If it doesn't exist, return the provided
default value.
The attribute name.
.
The attribute.
Return an attribute value identified by a token ID. If it doesn't exist, return the provided
default value.
.
.
The attribute.
Try get attribute.
.
.
true if it succeeds, false if it fails.
Try get attribute.
.
.
true if it succeeds, false if it fails.
Convert this object into a string representation.
This object as a string.
Add a single style in the form "styleName: value".
.
Add a single style in the form "styleName: value".
.
true to strict.
Removes the style described by name.
.
true if it succeeds, false if it fails.
Sets the styles.
The styles.
Sets the styles.
The styles.
true to strict.
Sets a style.
Thrown when the requested operation is unimplemented.
.
.
Sets a style.
Thrown when the requested operation is unimplemented.
.
.
true to strict.
Gets a style.
Thrown when the requested operation is unimplemented.
.
The style.
Attribute index key.
Name of the attribute.
.
Attribute index key.
Identifier for the attribute.
.
Attribute remove from index.
Identifier for the attribute.
Attribute add to index.
Identifier for the attribute.
Sets the class name.
And sets the value of the class attribute of the specified element.
Query if this object has default value.
true if default value, false if not.
Index key.
The prefix.
Identifier for the key token.
A string
Index key.
The prefix.
The key.
A string
Index key.
The prefix.
The key.
Full pathname of the file.
.
Generates a key that will be used to refernece this item in the index
The prefix.
Identifier for the key token.
Full path to the element.
A string representing the key for this item in the index
Enumerates all descendant elements in this collection.
A sequence of IDomElement objects
Query if 'tokenId' has attribute.
.
true if attribute, false if not.
Gets an attribute value for matching, accounting for default values of special attribute
types.
Identifier for the attribute.
The matched value
The attribute for matching.
Return the first ancestor of the specified tag
Identifier for the tag.
An IDomContainer
Sets a boolean property by creating or removing it
Identifier for the tag.
The value to set
Returns all child elements of a specific tag, cast to a type
Generic type parameter.
Backing field for NodeNameID property.
An enumerator.
Gets the enumerator.
Gets the enumerator.
The enumerator.
Enumerate the attributes + class & style.
An enumerator that allows foreach to be used to process attributes collection in this
collection.
Return a sequence of tokens for each non-class, non-style attribute that should be
added to the attribute index.
An enumerator of ushort.
Gets the dom attributes.
Returns true if this node has any actual attributes (not class or style)
An object encapsulating the Styles associated with this element.
Access to the IAttributeCollection interface for this element's attributes.
We don't actually refer to the inner AttributeCollection object here because we cannot allow
users to set attributes directly in the object: they must use SetAttribute so that special
handling for "class" and "style" as well as indexing can be performed. To avoid creating a
wrapper object,.
gets and sets the value of the "class" attribute of the specified element.
Get or set value of the "id" attribute.
The NodeName for the element. This always returns the name in upper case.
11
Gets the token that represents this element's NodeName
The value of the "type" attribute. For input elements, this property always returns a
lowercase value and defaults to "text" if there is no type attribute. For other element types,
it simply returns the value of the "type" attribute.
https://developer.mozilla.org/en/XUL/Property/type
TODO: in HTML5 type can be used on OL attributes (and maybe others?) and its value is case
sensitive. The Type of input elements is always lower case, though. This behavior needs to be
verified against the spec.
Gets or sets the name attribute of an DOM object, it only applies to the following elements:
<a> , <applet> , <form> , <frame> , <iframe> , <img> ,
<input> , <map> , <meta> , <object> , <option> , <param> ,
<select> , and <textarea> .
https://developer.mozilla.org/en/DOM/element.name
TODO: Verify that the attribute is applicable to this node type and return null otherwise.
The value of an input element, or the text of a textarea element.
For input elements, the "value" property of this element. Returns null for other element
types.
TODO: Value is only mapped to an attribute on certain elements. The HasValueProperty method
resolves this. When setting the Value property for any other element, it should still track
the value but never render it.
We do just the opposite; we don't return the value in that situation but always render it.
This should be fixed to work like the DOM so setting Value doesn't render.
Gets the type of the node.
The direct parent of this node.
Returns true if this node has any attributes.
Returns true if this node has any styles defined.
Returns true if this node has CSS classes.
Gets a value indicating whether this object type should be indexed.
Gets a value indicating whether HTML is allowed as a child of this element. It is possible
for this value to be false but InnerTextAllowed to be true for elements which can have inner
content, but no child HTML markup, such as <textarea> and <script>
Gets a value indicating whether text content is allowed as a child of this element.
Gets a value indicating whether this element may have children. When false, it means this is
a void element.
The child node at the specified index.
The zero-based index of the child node to access.
IDomObject, the element at the specified index within this node's children.
The child node at the specified index.
The zero-based index of the child node to access.
IDomObject, the element at the specified index within this node's children.
Gets or sets a value indicating whether the element is checked.
https://developer.mozilla.org/en/XUL/Property/checked
Gets or sets a value indicating whether the only should be read.
https://developer.mozilla.org/en/XUL/Property/readOnly
Returns text of the inner HTML. When setting, any children will be removed.
Gets or sets the text content of a node and its descendants.
The index excluding text nodes.
The object to which this index refers.
Returns true if this element is a block-type element.
A sequence of all unique class names defined on this element.
Gets or sets the outer HTML.
https://developer.mozilla.org/en-US/docs/DOM/element.outerHTML
Get the named attribute value
The name of the attribute
A string of the attribute value
The number of attributes in this attribute collection. This includes special attributes such
as "class", "id", and "style".
int
Default constructor
A SCRIPT
Default constructor
A LABEL element.
http://dev.w3.org/html5/spec/single-page.html#the-label-element
A LABEL element.
http://dev.w3.org/html5/spec/single-page.html#the-label-element
The form to which the label belongs
Gets or sets the for attribute
The control bound to this label
Default constructor.
The form to which the label belongs
Gets or sets the for attribute
The control bound to this label. If the "for" attribute is set, this is the control with that
ID. If not, the first input control that is a child of the label will be returned.
Interface for read only collection.
Generic type parameter.
Gets the number of items in the collection.
A FORM element.
http://dev.w3.org/html5/spec/single-page.html#the-form-element
Interface to a a read-only, strongly-typed node list.
Generic type parameter.
Interface for read only list.
Generic type parameter.
Indexer to get items within this collection using array index syntax.
Zero-based index of the entry to access.
The indexed item.
Get the item at the specified index
Zero-based index of the item
An item
Converts this object to a read-only list.
This object as an IList<IDomObject>
The number of nodes in this INodeList
The accept-charset content attribute.
The action attribute
The automcomplete attribute
Gets or sets the enctype.
Gets or sets the encoding.
Gets or sets the method attribute.
Gets or sets a value indicating whether the no validate.
Gets or sets the target attribute
An INodeList containing the form elements.
Values allowable for the Rel attribute
Gives alternate representations of the current document.
Gives a link to the current document's author.
Provides a link to context-sensitive help.
Imports an icon to represent the current document.
Indicates that the main content of the current document is covered by the copyright license described by the referenced document
Indicates that the current document is a part of a series, and that the next document in the series is the referenced document.
Specifies that the target resource should be preemptively cached.
Indicates that the current document is a part of a series, and that the previous document in the series is the referenced document.
Gives a link to a resource that can be used to search through the current document and its related pages.
Imports a stylesheet.
An PROGRESS element
http://dev.w3.org/html5/spec/the-meter-element.html#the-meter-element
The current value
The maximum value
The maximum value
The low value
The high value
The optimum value
A NodeList of all LABEL elements within this Progress element
An LI element.
http://dev.w3.org/html5/spec/single-page.html#the-li-element
A valid integer giving the ordinal value of the list item.
An PROGRESS element
http://dev.w3.org/html5/markup/progress.html
The current value
The maximum value
If the progress bar is an indeterminate progress bar, then the position IDL attribute must
return −1. Otherwise, it must return the result of dividing the current value by the maximum
value.
A NodeList of all LABEL elements within this Progress element
An HTMLOPTION element
http://dev.w3.org/html5/spec/single-page.html#attr-option-disabled
Gets or sets a value indicating whether this object is disabled.
The form with which the element is associated
Gets or sets the label attribute.
An HTML INPUT element.
http://dev.w3.org/html5/markup/input.html
The form with which to associate the element.
A URL that provides the destination of the hyperlink. If the href attribute is not specified,
the element represents a placeholder hyperlink.
Specifies that the element is a required part of form submission.
An Anchor (A) element.
http://dev.w3.org/html5/spec/single-page.html#the-a-element
A name or keyword giving a browsing context for UAs to use when following the hyperlink.
A URL that provides the destination of the hyperlink. If the href attribute is not specified,
the element represents a placeholder hyperlink.
The rel attribute on a and area elements controls what kinds of links the elements create.
The attribue's value must be a set of space-separated tokens.
A list of tokens that specify the relationship between the document containing the hyperlink
and the destination indicated by the hyperlink.
The media for which the destination of the hyperlink was designed.
Values allowable for the Rel attribute
Gives alternate representations of the current document.
Gives a link to the current document's author.
Gives the permalink for the nearest ancestor section.
Provides a link to context-sensitive help.
Indicates that the main content of the current document is covered by the copyright license described by the referenced document
Indicates that the current document is a part of a series, and that the next document in the series is the referenced document.
Indicates that the current document's original author or publisher does not endorse the referenced document.
Requires that the user agent not send an HTTP Referer (sic) header if the user follows the hyperlink.
Specifies that the target resource should be preemptively cached.
Indicates that the current document is a part of a series, and that the previous document in the series is the referenced document.
Gives a link to a resource that can be used to search through the current document and its related pages.
Gives a tag (identified by the given address) that applies to the current document.
A FORM element.
http://dev.w3.org/html5/spec/single-page.html#the-form-element
Default constructor.
Converts this object to a list.
This object as an IList<IDomElement>
The form element at the specified index
Zero-based index of the form element to obtain.
An IDomElement
Gets an enumerator of the form's elements.
The enumerator.
A name or keyword giving a browsing context for UAs to use when following the hyperlink.
The accept-charset attribute gives the character encodings that are to be used for the
submission. If specified, the value must be an ordered set of unique space-separated tokens
that are ASCII case-insensitive, and each token must be an ASCII case-insensitive match for
the preferred MIME name of an ASCII-compatible character encoding.
The accept charset.
http://dev.w3.org/html5/spec/single-page.html#attr-form-accept-charset
The action and formaction content attributes, if specified, must have a value that is a valid
non-empty URL potentially surrounded by spaces.
A string
The automcomplete attribute. The "off" state indicates that by default, input elements in the
form will have their resulting autocompletion state set to off; the "on" state indicates that
by default, input elements in the form will have their resulting autocompletion state set to
on.
The autocomplete.
Gets or sets the encoding type for the form. This must be one of "application/x-www-form-urlencoded",
"multipart/form-data", or "text/plain".
The enctype.
Gets or sets the encoding. This is a synonym for Enctype.
The encoding.
Gets or sets the method attribute. This must be one of GET or POST. When missing, the default
value is GET.
The method.
http://dev.w3.org/html5/spec/single-page.html#attr-fs-method
Gets or sets a value indicating whether the form should be validated during submission.
true to skip validation, false for normal behavior.
An INodeList containing the form elements.
The elements.
The number of elements in this form.
An integer
The form element at the specified index.
The zero-based index of the element to access.
IDomObject
An HTML progress element.
Default constructor.
The value of the meter
The maximum value.
The minimum value.
The low value.
The high value.
The optimum value.
A NodeList of all LABEL elements within this Progress element
An HTML LI element.
Default constructor.
The Value property of this LI element, or zero if it is not set.
An HTML progress element.
Default constructor.
For Progress elements, returns the value of the "value" attribute, or zero.
The maximum value allowed for this Progress bar.
If the progress bar is an indeterminate progress bar, then the position IDL attribute must
return −1. Otherwise, it must return the result of dividing the current value by the maximum
value.
A NodeList of all LABEL elements within this Progress element
An HTML text area element.
Default constructor.
The value of the HTMLRawInnerTextElementBase's contents
For HTMLRawInnerTextElementBase elements, InnerText doesn't actually do anything, whereas Value is the InnerText.
An HTML option element.
Default constructor.
The value of the OPTIOn element, or empty string if none specified.
Gets or sets a value indicating whether this object is disabled.
The form with which the element is associated.
Gets or sets the label for this Option element
Indicates whether the element is selected or not. This value is read-only. To change the
selection, set either the selectedIndex or selectedItem property of the containing element.
https://developer.mozilla.org/en/XUL/Attribute/selected
An HTML input element.
Default constructor.
Returns all the keys that should be in the index for this item (keys for class, tag,
attributes, and id)
An enumerator that allows foreach to be used to process index keys in this collection.
The value of form element with which to associate the element.
The HTML5 spec says "The value of the id attribute on the form with which to associate the
element." This is not what browsers currently return; they return the actual element. We'll
keep that for now.
A URL that provides the destination of the hyperlink. If the href attribute is not specified,
the element represents a placeholder hyperlink.
Specifies that the element is a required part of form submission.
The value of the "type" attribute. For input elements, this property always returns a
lowercase value and defaults to "text" if there is no type attribute. For other element types,
it simply returns the value of the "type" attribute.
TODO: in HTML5 type can be used on OL attributes (and maybe others?) and its value is case
sensitive. The Type of input elements is always lower case, though. This behavior needs to be
verified against the spec.
The type.
https://developer.mozilla.org/en/XUL/Property/type
Gets a value indicating whether this object has children. For input elements, this is always false.
An Anchor (A) element.
http://dev.w3.org/html5/spec/single-page.html#the-a-element
Default constructor.
A name or keyword giving a browsing context for UAs to use when following the hyperlink.
A URL that provides the destination of the hyperlink. If the href attribute is not specified,
the element represents a placeholder hyperlink.
The rel attribute on a and area elements controls what kinds of links the elements create.
The attribue's value must be a set of space-separated tokens.
A list of tokens that specify the relationship between the document containing the hyperlink
and the destination indicated by the hyperlink.
The media for which the destination of the hyperlink was designed.
An HTML SELECT element.
A SELECT element
A collection of HTML option elements (in document order)
https://developer.mozilla.org/en/DOM/HTMLOptionsCollection
Returns the index of the currently selected item. You may select an item by assigning its
index to this property. By assigning -1 to this property, all items will be deselected.
Returns -1 if no items are selected.
https://developer.mozilla.org/en/XUL/Property/selectedIndex.
Holds the currently selected item. If no item is currently selected, this value will be null.
You can select an item by setting this value. A select event will be sent to the container
(i.e. the listbox, richlistbox, etc., not the list item that was selected) when it is changed
either via this property, the selectedIndex property, or changed by the user.
https://developer.mozilla.org/en/XUL/Property/selectedItem
This Boolean attribute indicates that multiple options can be selected in the list. If it is
not specified, then only one option can be selected at a time.
https://developer.mozilla.org/en/HTML/Element/select
Gets the number of options in the select
Default constructor.
A collection of HTML option elements (in document order)
https://developer.mozilla.org/en/DOM/HTMLOptionsCollection
The number OPTION elements contained by this SELECT
The type string for this SELECT group.
This Boolean attribute indicates that multiple options can be selected in the list. If it is
not specified, then only one option can be selected at a time.
https://developer.mozilla.org/en/HTML/Element/select
Returns the index of the currently selected item. You may select an item by assigning its
index to this property. By assigning -1 to this property, all items will be deselected.
Returns -1 if no items are selected.
https://developer.mozilla.org/en/XUL/Property/selectedIndex.
Holds the currently selected item. If no item is currently selected, this value will be null.
You can select an item by setting this value. A select event will be sent to the container
(i.e. the listbox, richlistbox, etc., not the list item that was selected) when it is changed
either via this property, the selectedIndex property, or changed by the user.
https://developer.mozilla.org/en/XUL/Property/selectedItem
Get or set the value of the selected item for this Select list. When setting, if the value
cannot be matched to an option, no index will be selected.
An INodeList wrapper for an IList object
Generic type parameter.
Wraps a list in a NodeList object
The list.
Creates a new node list from an enumeration. This will enumerate the sequence at create time
into a new list.
The sequence
The inner list object.
Return the item at the specified index
Zero-based index of the.
An item of type T
Get the index of the item in this list
The item.
The 0-based index, or -1 if it does not exist in the list
Inserts an item at the specified position in the list
Zero-based index of the insertion point
The item.
Removes the item at the specified index
Zero-based index of the item to remove
Adds the item to the end of the list
The item to add
Clears this object to its blank/initial state.
Query if this object contains the given item.
The item.
true if the object is in this collection, false if not.
Copies the contents of this list to an array
The array.
Zero-based index of the starting point in the array to copy
Removes the given item from the list
The item.
true if it succeeds, false if it fails.
Gets the enumerator.
The enumerator.
Converts this object to an IList<T>
This object as an IList<T>
Gets the number of items in this NodeList.
Get or set the item at the specified index
Zero-based index of the entry to access.
The item.
Gets the number of items in this list
Gets or sets a value indicating whether this object is read only.
A collection of HTML options.
https://developer.mozilla.org/en/DOM/HTMLOptionsCollection
Interface to a collection of HTML options.
https://developer.mozilla.org/en/DOM/HTMLOptionsCollection
Returns the specific node at the given zero-based index (gives null if out of range)
The zero-based index of the option element.
An HTML Option element.
https://developer.mozilla.org/en/DOM/HTMLOptionsCollection
Returns the specific node with the given DOMString (i.e., string) id. Returns null if no such named node exists.
The zero-based index of the option element.
An HTML Option element.
https://developer.mozilla.org/en/DOM/HTMLOptionsCollection
Returns the specific node at the given zero-based index (gives null if out of range)
The zero-based index of the option element.
An HTML Option element.
https://developer.mozilla.org/en/DOM/HTMLOptionsCollection
Returns the specific node with the given DOMString (i.e., string) id. Returns null if no such named node exists.
The zero-based index of the option element.
An HTML Option element.
https://developer.mozilla.org/en/DOM/HTMLOptionsCollection
Creates an HTMLOptionsCollection from the children of a Select element.
Thrown when one or more arguments have unsupported or illegal values.
The parent element for this collection.
Returns the specific node at the given zero-based index (gives null if out of range)
The zero-based index of the option element.
An HTML Option element.
https://developer.mozilla.org/en/DOM/HTMLOptionsCollection
Returns the specific node with the given DOMString (i.e., string) id. Returns null if no such
named node exists.
Thrown when the requested operation is unimplemented.
The zero-based index of the option element.
An HTML Option element, or null if the named element does not exist.
https://developer.mozilla.org/en/DOM/HTMLOptionsCollection
Gets the enumerator.
The enumerator.
Gets the enumerator.
The enumerator.
Enumerates the element children of a node.
An sequence of elements
Implementation for Children. The bool part of the tuple indicates if the element inherits a
"disabled" property.
The parent element for this collection.
An enumerator that allows foreach to be used to process children in this collection.
Gets the parent element for this collection
Returns the specific node at the given zero-based index (gives null if out of range)
The zero-based index of the option element.
An HTML Option element.
https://developer.mozilla.org/en/DOM/HTMLOptionsCollection.
Returns the specific node at the given zero-based index (gives null if out of range)
The name of the option element
An HTML Option element.
https://developer.mozilla.org/en/DOM/HTMLOptionsCollection
Logic: if nothing specifically selected, find the first enabled option, otherwise, the first disabled option.
Interface for a DOM index. Defines methods to add and remove items from the index, and query the index.
Adds an element to the index.
The index key. This should be a unique path to the element in the Document tree. The format
is determined by environmental settings. This is for internal use.
The element.
Adds an element to the index.
The element.
Removes an element from the index
The index key. This should be a unique path to the element in the Document tree. The format
is determined by environmental settings. This is for internal use.
Removes an element from the index.
The element.
Queries the index
The sub key.
The depth.
true to include, false to exclude the descendants.
An enumerator that allows foreach to be used to process query index in this collection.
Queries the index.
The sub key.
An enumerator that allows foreach to be used to process query index in this collection.
The primary selection index.
Any user data to be persisted with this DOM.
A collection of attributes.
Default constructor.
Removes all attributes from this collection.
Makes a deep copy of the attribute collection.
A copy of this object.
Adds a new name/value pair to the collection
The name of the attribute.
The value.
Removes the named attribute from the collection.
The name to remove.
true if it succeeds, false if it fails.
Removes an attribute identified by its token ID from the collection
The unique token ID for the attribute name.
true if it succeeds, false if it fails.
Test whether the named attribute exists in the collection.
The attribute name.
true if it exists, false if not.
Test whether the attribute identified by its unique token ID exists in the collection.
The unique token ID for the attribute name.
true if it exists, false if not.
Try to get a value for the specified attribute name.
The key.
[out] The value.
true if the key was present, false if it fails.
Try to get a value for the specified attribute identified by its unique token ID.
The attribute's token ID.
[out] The value.
true if the key was present, false if not.
Sets a boolean only attribute having no value.
The attribute to set
Sets a boolean only attribute having no value.
The attribute's unique token ID
Remove an attribute.
The attribute name
true if it succeeds, false if it fails.
Remove an attribute.
The unique token ID for the attribute name.
true if it succeeds, false if it fails.
Adding an attribute implementation
Second to last line of defense -- will call back to owning Element for attempts to set class, style, or ID, which are
managed by Element.
Used by DomElement to (finally) set the ID value
Enumerates the attributes in this collection as a sequence of KeyValuePairs.
A sequence of KeyValuePair<string,string> objects.
Gets the enumerator for this AttributeCollection
The enumerator.
Test whether there are any attributes in this collection.
The number of attributes in this collection
Get or set an attribute value by name
The name of the attribute.
The value.
Get a sequence of all attribute names in this collection.
A collection of all the values in this attribute collection
A case-insensitive character equality comparer.
Factory that creates an EqualityComparer<char> based on the case sensitivity
requirements.
true if the EqualityComparer should be case sensitive.
An EqualityComparer<char>
Tests if two char objects are considered equal.
Character to be compared.
Character to be compared.
true if the objects are considered equal, false if they are not.
Calculates the hash code for this object.
The object.
The hash code for this object.
A case-sensitive character equality comparer.
Tests if two char objects are considered equal.
Character to be compared.
Character to be compared.
true if the objects are considered equal, false if they are not.
Calculates the hash code for this object.
The object.
The hash code for this object.
Enumerator of possible quoting rules that determine how parameters for CSS selector functions
should be parsed.
The parameter value should never be quoted (e.g. is numeric data, or the function simply doesn't expect quotes).
The parameter value should always be quoted.
The parameter value may be quoted: if the first character is a double- or single-quote, then a matching quote terminates the parameter value..
Port of James Padolsey's regex jQuery selector: http://james.padolsey.com/javascript/regex-selector-for-jquery/
A base class for filter-type selectors that implements a simple iterator function and calls
Matches for each element. Classes that depend on the element's position in the filtered list
cannot use this and should implement IPseudoSelectorFilter directly.
Base class for any pseudoselector that implements validation of min/max parameter values, and
argument validation. When implementing a pseudoselector, you must also implement an interface for the type
of pseudoselector
General interface for a pseudoselector filter.
This method is called before any validations are called against this selector. This gives the
developer an opportunity to throw errors based on the configuration outside of the validation
methods.
The minimum number of parameters that this selector requires. If there are no parameters, return 0
An integer
The maximum number of parameters that this selector can accept. If there is no limit, return -1.
An integer
Gets CSS name of the pseudoselector
A value to determine how to parse the string for a parameter at a specific index.
Zero-based index of the parameter.
NeverQuoted to treat quotes as any other character; AlwaysQuoted to require that a quote
character bounds the parameter; or OptionallyQuoted to accept a string that can (but does not
have to be) quoted. The default abstract implementation returns NeverQuoted.
Parse the arguments using the rules returned by the ParameterQuoted method.
The arguments
An array of strings
Parse single argument passed to a pseudoselector
Thrown when one or more arguments have unsupported or illegal values.
Thrown when the requested operation is unimplemented.
The arguments.
The parsed string
Validates a parameter array against the expected number of parameters.
Thrown when the wrong number of parameters is passed.
Criteria (or parameter) data passed with the pseudoselector.
Gets the string for a parameter count mismatch error.
A string to be used as an exception message.
Get a string for an error when there are invalid arguments
A string to be used as an exception message.
Gets or sets criteria (or parameter) data passed with the pseudoselector
This method is called before any validations are called against this selector. This gives the
developer an opportunity to throw errors based on the configuration outside of the validation
methods.
The arguments.
The minimum number of parameters that this selector requires. If there are no parameters, return 0
An integer
The maximum number of parameters that this selector can accept. If there is no limit, return -1.
An integer
Return the properly cased name of this selector (the class name in non-camelcase)
A pseudoselector that filters a list of elements. Most jQuery extensions fall within this
category.
Filter only the elements matching this result-list position type selector.
The sequence of elements prior to this filter being applied.
A sequence of matching elements.
Test whether an element matches this selector.
The element to test.
true if it matches, false if not.
Basic implementation of ChildMatches, runs the Matches method against each child. This should
be overridden with something more efficient if possible. For example, selectors that inspect
the element's index could get their results more easily by picking the correct results from
the list of children rather than testing each one.
The parent element.
A sequence of children that match.
Allow but do not require quotes around the parameters for :regex.
Zero-based index of the parameter.
OptionallyQuoted.
Matches elements that have children containing the specified text.
http://api.jquery.com/contains-selector/
Return elements from the selection that contain the text in the parameter
A sequence of elements
The elements from the sequence that contain the text
Test whether a single element contains the text passed in the selector's parameter
The element to test.
true if it contains the text, false if not.
A value to determine how to parse the string for a parameter at a specific index.
Zero-based index of the parameter.
Always returns OptionallyQuoted
The maximum number of parameters that this selector can accept (1)
An integer.
The minimum number of parameters that this selector requires (1)
An integer.
Pseudoclass selector for :lang. This is not currently implemented. The problem with :lang is
that it is based on an inherited property value. This messes with the index since elements
will be pre-filtered by an attribute selector. This could be implemented using a pseudoclass
type construct instead, e.g. as "visible" that traverses through parents, and inherits a
default document-wide setting.
Base class for an Child-type pseudoselector.
A pseudo-selector that depends only on an actual element's properties and/or it's
relationship to other elements within the DOM. All CSS pseudoselectors fall within this
category.
Test whether this element matches the selector implementation.
The object.
true if it succeeds, false if it fails.
Return a sequence of all children matching the selector implementation
The parent element.
A sequence of children that match
Test whether an element matches this selector.
The element to test.
true if it matches, false if not.
Basic implementation of ChildMatches, runs the Matches method against each child. This should
be overridden with something more efficient if possible. For example, selectors that inspect
the element's index could get their results more easily by picking the correct results from
the list of children rather than testing each one.
Also note that the default iterator for ChildMatches only passed element (e.g. non-text node)
children. If you wanted to design a filter that worked on other node types, you should
override this to access all children instead of just the elements.
The parent element.
A sequence of children that match.
Test whether an element matches this selector.
Thrown when the requested operation is unimplemented.
The element to test.
true if it matches, false if not.
A pseudoselector that returns elements that are hidden. Visibility is defined by CSS: a
nonzero opacity, a display that is not "hidden", and the absence of zero-valued width &
heights. Additionally, input elements of type "hidden" are always considered not visible.
Test whether an element is hidden.
The element to test.
true if it matches, false if not.
A pseudoselector that returns elements that are visible. Visibility is defined by CSS: a
nonzero opacity, a display that is not "hidden", and the absence of zero-valued width &
heights. Additionally, input elements of type "hidden" are always considered not visible.
Test whether an element is visible
The element to test.
true if it matches, false if not.
Test whether the passed element is visible, based on CSS styles and height/width properties.
The element to test.
true if visible, false if not.
Matches the last element of the same type within its siblings
http://reference.sitepoint.com/css/pseudoclass-lastoftype
Test whether an element is the last child of its type.
The element to test.
true if it matches, false if not.
Return all child elements of element that are the last child of their type
The parent element.
A sequence of children that match.
Matches the first element of the same type within its siblings
http://reference.sitepoint.com/css/pseudoclass-firstoftype
Test whether an element is the first child of its type
The element to test.
true if it matches, false if not.
Return all children of the parameter element that are the first child of their type.
The parent element.
A sequence of children that match.
Mathches elements that are the the first child of a parent
http://reference.sitepoint.com/css/pseudoclass-firstchild
Test whether an element is the only child of its parent
The element to test.
true if it matches, false if not.
Return the only child of the parent element, or nothing if there are zero or more than one
children.
The parent element.
A sequence of children that match.
Mathches elements that are the the first child of a parent
http://reference.sitepoint.com/css/pseudoclass-firstchild
Test whether an element is the first child of its parent
The element to test.
true if it matches, false if not.
Return the first child of element
The parent element.
A sequence of children that match.
Mathches elements that are the the last child of a parent
http://reference.sitepoint.com/css/pseudoclass-lastchild
Test whether an element is the last child of its parent
The element to test.
true if it matches, false if not.
Return the last child of the parent
The parent element.
A sequence of children that match.
Return elements that don't match a selector.
http://reference.sitepoint.com/css/pseudoclass-not
Return all elements that do not match the selector passed as a parameter to the :not()
selector.
The sequence of elements prior to this filter being applied.
A sequence of matching elements.
The maximum number of parameters that this selector can accept (1)
An integer.
The minimum number of parameters that this selector requires (1)
An integer.
Return only the last element from a selection
The child selector
Return only the elements in the sequence whose children match the ChildSelector
The sequence of elements prior to this filter being applied.
A sequence of elements
Enumerates descendants in this collection.
The parent.
An enumerator that allows foreach to be used to process descendants in this collection.
Arguments for the "has" selector.
The arguments.
The maximum number of parameters that this selector can accept (1)
An integer.
The minimum number of parameters that this selector requires (1)
An integer.
Return only the last element from a selection
Filter for the last element in the selection set
The sequence of elements prior to this filter being applied.
The last element in the selection.
Return only odd-numbered elements from the selection
Filter the sequence, returning only the first element.
A sequence of elements
The first element in the sequence, or an empty sequence if the original sequence is empty.
Return only odd-numbered elements from the selection
Filter a sequence of elements, returning only the elements at even-numbered ordinal positions
The sequence to filter
A sequence of elements
Return only odd-numbered elements from the selection
Filter the sequence of elements for only those in odd-number ordinal indices
The sequence of elements prior to this filter being applied.
A sequence of matching elements.
Base class for jQuery filters that test whether an element appears at the specified position with the list.
Abstract implementation of the Filter method for the Index filter.
The sequence of elements prior to this filter being applied.
A sequence of matching elements.
The zero-based index for which to test.
The maximum number of parameters that this selector can accept (1)
An integer.
The minimum number of parameters that this selector requires (1)
An integer.
Test whether an element appears after the specified position with the list.
Filter the sequence to include only those elements with an ordinal index greater than the
value of the Index property.
The selection.
An filtered sequence
Test whether an element appears before the specified position with the list.
Filter the sequeence of elements for those with an ordinal index less than the Index value.
The sequence of elements prior to this filter being applied.
A sequence of matching elements.
Test whether an element appears at the specified position with the list.
Filter a sequence of elements, returning only the element at the specified position
A sequence of elements
A sequence containing one or zero elements
Mathches elements that are the only sibling of this type.
http://reference.sitepoint.com/css/pseudoclass-onlyoftype
Test whether an element is the only element of its type among its siblings.
The element to test.
true if it matches, false if not.
Return the children of the parent element that are the only elements of that type among the
other children.
The parent element.
A sequence of children that match.
When there's no type, it must return all children that are the only one of that type
The jQuery ":header" selector
Test whether an element is a header (H1-H6)
The element to test.
true if it matches, false if not.
Determines whether the target is a parent.
Test whether an element is a parent; e.g. has children.
The element to test.
true if it matches, false if not.
Test whether an element is empty. Elements that contain text nodes with empty or null values
are considered empty.
Test whether the element is empty
The element to test.
true if it has no non-whitespace children, false if not
Test whether an element contains no non-empty children. An element can technically have
children, but if they are text nodes with empty values, then it's considered empty.
The element to test
true if an element is empty, false if not.
Nth last of type pseudo-class selector.
http://reference.sitepoint.com/css/pseudoclass-nthlastoftype
Base class for all nth-child type pseudoclass selectors
Test whether this element matches the selector implementation.
The object.
true if it succeeds, false if it fails.
Return a sequence of all children matching the selector implementation.
The parent element.
A sequence of children that match.
NthChildMatcher object for use by inherited classes
An instance of the NthChildMatcher support class
The minimum number of parameters that this selector requires (1)
An integer.
The maximum number of parameters that this selector can accept (1)
An integer.
Tests whether the element is the nth-last-of-type based on the parameter n passed with the selector
The element.
true if the element matches.
Enumerates all the elements that are the nth-last-of-type
The parent element.
A sequence of matching elements
Return the nth last child using the formula passed by paremter to calculate N.
http://reference.sitepoint.com/css/pseudoclass-nthlastchild
Test whether this element is an nth child from the end among its siblings
The element to test
true if it matches, false if not.
Return a sequence of all children of the element that are nth last children.
The parent element.
A sequence of children that match.
nth-of-type pseudo class selector. Returns elements that are the nth of their type among
their siblings.
http://reference.sitepoint.com/css/pseudoclass-nthoftype
Test whether this element is an nth of its type.
The object.
true if it succeeds, false if it fails.
Return a sequence of all children that are the nth element of their type.
The parent element.
A sequence of children that match.
Matches elements on the basis of their positions within a parent element’s list of child element
http://reference.sitepoint.com/css/pseudoclass-nthchild
Test whether this element is an nth child of its parent where values of n are calculate from
the formula passed as a parameter to the :nth-child(n) selector.
The object.
true if it succeeds, false if it fails.
Return a sequence of all children of the parent element that are nth children
The parent element.
A sequence of children that match.
Values that represent AssociationType; which determines how to group adjacent operands when
parsing an equation.
Associate with other Addition operands
associate with other Multiplcation operands
never associate, associate only directly adjacent operands.
never associate, and use parenthesized operands.
Values that represent OperationType for an arithmetic operator.
Addition or +
Subtraction or -.
Multiplication or *.
Division or /.
Modulus or %.
Power or ^.
Factory class for creating equation objects.
Creates an equation returning a specic type from a string
The type of value returned by the equation.
The text of the equation.
The new equation< t>
Creates a new equation from a string.
The text of the equation
The new equation.
Create an operand by parsing a string. Like CreateEquation but does not wrap in an Equation
object.
The operand text
The new equation operand.
Interface for an equation clause.
The name of this variable
Interface for an equation.
Sets the value of a named variable.
The name.
The value.
Sets the value of a strongly-typed named variable.
The type of the variable.
The name.
The value.
Executes the equation, setting the variables in order they were created with the passed
values. Any variables that were already set using SetValue will be unaffected; if this method
is uncertain in a given context, then it should be called with no parameters and all
variables set with SetValue. If errors occur while parsing the equation, and exception will
be thrown.
A variable-length parameters list containing values.
The value.
Execute the equation using the values passed; if any errors occur, return false.
[out] The result.
A variable-length parameters list containing values.
true if it succeeds, false if it fails.
Execute the equation using existing variable data; if any errors occur, return false.
[out] The result.
true if it succeeds, false if it fails.
Makes a deep copy of this object.
A copy of this object.
Compiles the equation.
A dictionary of variable names and values.
Gets or sets the outermost operand of this equation.
T is the output type of the function.
An equation.
Abstract hooks for cloning. To allow more flexibility in inheriting part of the process
(e.g. part of the code to copy the instance may be shared, but not instance-making code)
it's split into two parts.
Since it isn't possible to have compile-time type checking for the generic implementation beyond
IConvertible, allow implementations to define the types that are valid
Get the value of this operand
The value.
Indicates that this operand is either an integral type or contains an integral value.
That is, non-integral types containing integral values will still report true
Makes a deep copy of this object.
A copy of this object.
Compiles the equation.
Execute the equation using existing variable data; if any errors occur, return false.
[out] The result.
true if it succeeds, false if it fails.
Execute the equation using the values passed; if any errors occur, return false.
[out] The result.
A variable-length parameters list containing values.
true if it succeeds, false if it fails.
Sets the value used for a variable when the function is next run.
The variable name
The value
Sets the value used for a variable when the function is next run.
Zero-based index of the.
.
Sets the value of a strongly-typed named variable.
The type of the variable.
The name.
The value.
Get the value of this operand.
The value.
Set the paramenters in order to the values passed, and returns the result of the equation
The names of the variables in the order added. For functions (where the parameters are passed only by order)
this is important. Probably could move this to the Function implementation
but it requires overriding everything, almost easier to keep it here.
The root operand for the equation. The equation must not be changed once set, or variables
will not be bound.
The values set (on order that each variable appears first in the equation) for each varaiable
Error (if any) that occurred while parsing
An equation that returns a particular type.
The type of value returned.
Interface for a strongly-typed equation.
The type of value returned by the equation.
Execute the equation and return the result
The values of the variables for this equation, in the order the variables were created.
The value.
Execute the equation; if an error occurs, return false.
[out] The result.
true if it succeeds, false if it fails.
Execute the equation; if an error occurs, return false.
[out] The result.
The values of the variables for this equation, in the order the variables were created.
true if it succeeds, false if it fails.
Makes a deep copy of this object.
A copy of this object.
Clone the equation, changing the output type.
Generic type parameter.
A clone of the equation that returns type U.
Replaces the last item
This is static so it can be used by the constructors -- sets the value of the strongly typed
instance.
The value to set
Return the fuction class for this type of operator
Default implementation of OrderedDictionary-T,TKey,TValue-
A dictionary that also maintains the order added.
The concrete type of dictionary to use for the inner dictionary
The key type
The value type
This class is optimized for access by numeric index, or accessing an object by key. If there's a frequent
need to obtain the numeric index from the key then this should have another dictionary added to xref.
Insert an item by value only. Dup values are possible this way, it will have a key equal to the string of its index.
Setting uses indexOf - not optimized.
An interface representing a dictionary that also has intrinsic element order.
Type of the key.
Type of the value.
Obtain the zero-based index of the given key.
The key.
The zero-based index of the key in the ordered dictionary
Test if the type is a numeric primitive type, e.g. all except string, char & bool.
The type to test.
true if numeric type, false if not.
Any primitive type that can be converted to a number, e.g. all except string. This just
returns any primitive type that is not IEnumerable.
The type to test.
true if numeric convertible, false if not.
Test if the value is a string or char type
The value to test
true if text or char, false if not.
Factory to return a function object based on a name
Thrown when the named function is not known.
The return type of the function
Name of the function.
The function< t>
If the value is an operand, returns it, otherwise creates the right kind of operand
Return the proper type for an object (ignoring nullability)
Returns true of the type is a generic nullable type OR string
The name of this variable
The value has been obtained. When true, the cached value will be used instead of requerying. Clear() resets this.
Release stored value for this variable, causing it to be re-read from the owner
CqXmlDocument. This is not fully implemented and should not be used.
Cq XML node. This is not implemented completely. Not suggested that you use it.
Clean an XML node name. Since the only problematic node names should be like "#text" we just
look for a # and strip it.
The name.
A string that's acceptable as an XML node name.
Extension methods for converting to XML
An adapter to map an INodeList to an XmlNodeList. NOT IMPLEMENTED.
Constructor.
The XML document.
List of nodes.
An enumerator for the node list.
An .
Retrieves a node at the given index.
Zero-based index into the list of nodes.
The in the collection. If is
greater than or equal to the number of nodes in the list, this returns null.
The number of nodes in this list
Used for indicating desired behavior with legacy doctypes.
Be a pure HTML5 parser.
Require the HTML 4.01 Transitional public id. Turn on HTML4-specific
additional errors regardless of doctype.
Require the HTML 4.01 Transitional public id and a system id. Turn on
HTML4-specific additional errors regardless of doctype.
Treat the doctype required by HTML 5, doctypes with the HTML 4.01 Strict
public id and doctypes with the HTML 4.01 Transitional public id and a
system id as non-errors. Turn on HTML4-specific additional errors if the
public id is the HTML 4.01 Strict or Transitional public id.
Never enable HTML4-specific error checks. Never report any doctype
condition as an error. (Doctype tokens in wrong places will be
reported as errors, though.) The application may decide what to log
in response to calls to DocumentModeHanler. This mode
is meant for doing surveys on existing content.
The Standards Mode
The Limited Quirks Mode aka. The Almost Standards Mode
The Quirks Mode
Receive notification of the document mode.
The document mode.
The public identifier of the doctype or null if unavailable.
The system identifier of the doctype or null if unavailable.
true if HTML 4-specific checks were enabled,
false otherwise
When true, the client has decided to accept the charset-encoding for the document and the
current processing must be suspended. (Set true to stop encoding).
Tokenizer reports tokens through this interface.
This method is called at the start of tokenization before any other
methods on this interface are called. Implementations should hold the
reference to the Tokenizer in order to set the content
model flag and in order to be able to query for Locator data.
The Tokenizer.
Receive a doctype token.
The name.
The public identifier.
The system identifier.
Whether the token is correct.
Receive a start tag token.
The tag name.
The attributes.
TODO
Receive an end tag token.
The tag name.
Receive a comment token. The data is junk if thewantsComments()
returned false.
The buffer holding the data.
The offset into the buffer.
The number of code units to read.
Receive character tokens. This method has the same semantics as the SAX
method of the same name.
A buffer holding the data.
The offset into the buffer.
The number of code units to read.
Reports a U+0000 that's being turned into a U+FFFD.
The end-of-file token.
The perform final cleanup.
If this handler implementation cares about comments, return true.
If not, return false
Whether this handler wants comments
Checks if the CDATA sections are allowed.
true if CDATA sections are allowed
Gets a value indicating whether self-closing tags should be allowed. When true, any tag may
close itself. When false, a self-closing tag is treated like an opening-tag only.
Policy for XML 1.0 violations.
Conform to HTML 5, allow XML 1.0 to be violated.
Halt when something cannot be mapped to XML 1.0.
Be non-conforming and alter the infoset to fit
XML 1.0 when something would otherwise not be
mappable to XML 1.0.
The mode value for HTML.
The mode value for MathML.
The mode value for SVG.
The mode value for lang-mapping HTML.
An array representing no namespace regardless of namespace mode (HTML,
SVG, MathML, lang-mapping HTML) used.
An array that has no namespace for the HTML mode but the XMLNS namespace
for the SVG and MathML modes.
An array that has no namespace for the HTML mode but the XML namespace
for the SVG and MathML modes.
An array that has no namespace for the HTML mode but the XLink namespace
for the SVG and MathML modes.
An array that has no namespace for the HTML, SVG and MathML modes but has
the XML namespace for the lang-mapping HTML mode.
An array for no prefixes in any mode.
An array for no prefixe in the HTML mode and the
xmlns prefix in the SVG and MathML modes.
An array for no prefixe in the HTML mode and the
xlink
prefix in the SVG and MathML modes.
An array for no prefixe in the HTML mode and the
xml prefix in the SVG and MathML modes.
An initialization helper for having a one name in the SVG mode and
another name in the other modes.
The name for the non-SVG modes
The name for the SVG mode
The initialized name array
An initialization helper for having a one name in the MathML mode and
another name in the other modes.
The name for the non-MathML modes
The name for the MathML mode
The initialized name array
An initialization helper for having a different local name in the HTML
mode and the SVG and MathML modes.
The name for the HTML mode
The name for the SVG and MathML modes
The initialized name array
An initialization helper for having the same local name in all modes.
The name
The initialized name array
Returns an attribute name by buffer.
C++ ownership: The return value is either released by the caller if the
attribute is a duplicate or the ownership is transferred to
HtmlAttributes and released upon clearing or destroying that object.
The buffer
ignored
Length of data
Whether to check ncnameness
An AttributeName corresponding to the argument data
This method has to return a unique integer for each well-known
lower-cased attribute name.
The buffer.
The length.
The namespaces indexable by mode.
The local names indexable by mode.
The prefixes indexably by mode.
The qnames indexable by mode.
Initializes a new instance of the class (The startup-time constructor).
The namespace.
The local name.
The prefix.
The flags.
Creates an AttributeName for a local name.
The name.
Whether to check ncnameness.
An AttributeName
TODO: remove this (?)
Clones the attribute using an interner. Returns
this in Java and for non-dynamic instances in C++.
A clone.
Creator for use when the XML violation policy requires an attribute name
to be changed.
The name.
The name of the attribute to create
Determines whether this name is an XML 1.0 4th ed. NCName.
The SVG/MathML/HTML mode
true if if this is an NCName in the given mode; otherwise, false.
**
Queries whether this is an xmlns attribute.
true if this is an xmlns attribute; otherwise, false.
Determines whether this attribute has a case-folded value in the HTML4 mode
of the parser.
true if the value is case-folded; otherwise, false.
A common superclass for tree builders that coalesce their text nodes.
Interface for exposing the state of the HTML5 tree builder so that the
interface can be implemented by the tree builder itself and by snapshots.
Gets the stack.
The stack
Gets the list of active formatting elements.
The list of active formatting elements.
Gets the form pointer.
The form pointer
Gets the head pointer.
The head pointer.
Gets the deep tree surrogate parent.
The deep tree surrogate parent.
Gets the mode.
The mode.
Gets the original mode.
The original mode.
Determines whether the frameset is OK.
true if the frameset is OK; otherwise, false.
Determines whether we need to drop LF.
true if we need to drop LF; otherwise, false.
Determines whether this instance is in quirks mode.
true if this instance is in quirks mode; otherwise, false.
Used only when moving back to IN_BODY.
Used to work around Gecko limitations. Not used in Java.
Reports an condition that would make the infoset incompatible with XML
1.0 as fatal.
Reports a Parse Error.
The message.
Reports a Parse Error without checking if an error handler is present.
The message.
Reports a stray start tag.
The name of the stray tag.
Reports a stray end tag.
The name of the stray tag.
Reports a state when elements expected to be closed were not.
The position of the start tag on the stack of the element
being closed.
The name of the end tag.
Reports a state when elements expected to be closed ahead of an implied
end tag but were not.
The position of the start tag on the stack of the element
being closed.
The name of the end tag.
Reports a state when elements expected to be closed ahead of an implied
table cell close.
The position of the start tag on the stack of the element
being closed.
Reports arriving at/near end of document with unclosed elements remaining.
The message.
Reports the name and location of an unclosed element.
The position.
Reports a warning
The message.
Receive a comment token. The data is junk if thewantsComments()
returned false.
The buffer holding the data.
The offset into the buffer.
The number of code units to read.
Receive character tokens. This method has the same semantics as the SAX
method of the same name.
A buffer holding the data.
The offset into the buffer.
The number of code units to read.
Reports a U+0000 that's being turned into a U+FFFD.
The end-of-file token.
The perform final cleanup.
Attempt to add attribute to the body element.
The attributes.
true if the attributes were added
The argument MUST be an interned string or null.
@param context
The argument MUST be an interned string or null.
@param context
Flushes the pending characters. Public for document.write use cases only.
Creates a comparable snapshot of the tree builder state. Snapshot
creation is only supported immediately after a script end tag has been
processed. In C++ the caller is responsible for calling
delete on the returned object.
A snapshot
If this handler implementation cares about comments, return true.
If not, return false
Whether this handler wants comments
Checks if the CDATA sections are allowed.
true if CDATA sections are allowed
Gets the list of active formatting elements.
Gets the stack.
The mask for extracting the dispatch group.
Indicates that the element is not a pre-interned element. Forbidden
on preinterned elements.
Indicates that the element is in the "special" category. This bit
should not be pre-set on MathML or SVG specials--only on HTML specials.
The element is foster-parenting. This bit should be pre-set on elements
that are foster-parenting as HTML.
The element is scoping. This bit should be pre-set on elements
that are scoping as HTML.
The element is scoping as SVG.
The element is scoping as MathML.
The element is an HTML integration point.
The element has an optional end tag.
The lowest 7 bits are the dispatch group. The high bits are flags.
This method has to return a unique integer for each well-known
lower-cased element name.
**
Be careful with this class. QName is the name in from HTML tokenization.
Otherwise, please refer to the interface doc.
Only use with a static argument
Only use with static argument.
This is only used for AttributeName ownership transfer
in the isindex case to avoid freeing custom names twice in C++.
Interface for getting the current line and column
(Corresponds to the SAX Locator interface).
This is implemented by Locator and Tokenizer.
Class for C++ portability.
TODO: Remove this
Allocates a new local name object. In C++, the refcount must be set up in such a way that
calling releaseLocal on the return value balances the refcount set by this method.
Constructor for copying. This doesn't take another StackNode
because in C++ the caller is reponsible for reobtaining the local names
from another interner.
Short hand for well-known HTML elements.
Constructor for HTML formatting elements.
The common-case HTML constructor.
Constructor for SVG elements. Note that the order of the arguments is
what distinguishes this from the HTML constructor. This is ugly, but
AFAICT the least disruptive way to make this work with Java's generics
and without unnecessary branches. :-(
Constructor for MathML.
Returns a that represents this instance.
A that represents this instance.
Gets the stack.
Gets the list of active formatting elements.
Gets the mode.
Gets the original mode.
Gets a value indicating whether this instance is frameset ok.
true if this instance is frameset ok; otherwise, false.
Gets a value indicating whether this instance is need to drop LF.
true if this instance is need to drop LF; otherwise, false.
Gets a value indicating whether this instance is quirks.
true if this instance is quirks; otherwise, false.
An implementation of
http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html
This class implements the Locator interface. This is not an
incidental implementation detail: Users of this class are encouraged to make
use of the Locator nature.
By default, the tokenizer may report data that XML 1.0 bans. The tokenizer
can be configured to treat these conditions as fatal or to coerce the infoset
to something that XML 1.0 allows.
Magic value for UTF-16 operations.
Buffer growth parameter.
UTF-16 code unit array containing less than and greater than for emitting
those characters on certain parse errors.
UTF-16 code unit array containing less than and solidus for emitting
those characters on certain parse errors.
UTF-16 code unit array containing ]] for emitting those characters on
state transitions.
Array version of U+FFFD.
Array version of space.
Array version of line feed.
"CDATA[" as char[]
"octype" as char[]
"ublic" as char[]
"ystem" as char[]
Whether the previous char read was CR.
Buffer for short identifiers.
Number of significant chars in strBuf.
Buffer for long strings.
Number of significant chars in longStrBuf.
Buffer for expanding NCRs falling into the Basic Multilingual Plane.
Buffer for expanding astral NCRs.
The element whose end tag closes the current CDATA or RCDATA element.
true if tokenizing an end tag
The current tag token name.
The current attribute name.
Whether comment tokens are emitted.
true when HTML4-specific additional errors are requested.
Whether the stream is past the first 512 bytes.
The name of the current doctype token.
The public id of the current doctype token.
The system id of the current doctype token.
The attribute holder.
The policy for vertical tab and form feed.
The policy for comments.
The constructor.
@param tokenHandler
the handler for receiving tokens
Sets the tokenizer state and the associated element name. This should
only ever used to put the tokenizer into one of the states that have
a special end tag expectation.
@param specialTokenizerState
the tokenizer state to set
@param endTagExpectation
the expected end tag for transitioning back to normal
Sets the tokenizer state and the associated element name. This should
only ever used to put the tokenizer into one of the states that have
a special end tag expectation.
@param specialTokenizerState
the tokenizer state to set
@param endTagExpectation
the expected end tag for transitioning back to normal
Appends to the smaller buffer.
@param c
the UTF-16 code unit to append
Returns the short buffer as a local name. The return value is released in
emitDoctypeToken().
@return the smaller buffer as local name
Emits the smaller buffer as character tokens.
@throws SAXException
if the token handler threw
Appends to the larger buffer.
@param c
the UTF-16 code unit to append
Append the contents of the smaller buffer to the larger one.
Emits the current comment token.
The provisional hyphens.
The position.
Flushes coalesced character tokens.
The buffer.
The position.
Reports an condition that would make the infoset incompatible with XML
1.0 as fatal.
@param message
the message
@throws SAXException
@throws SAXParseException
Reports a Parse Error.
@param message
the message
@throws SAXException
Reports a warning
@param message
the message
@throws SAXException
@param val
@throws SAXException
Sets an offset to be added to the position reported to
TransitionHandler.
The offset.
Returns the mappingLangToXmlLang.
@return the mappingLangToXmlLang
Sets the commentPolicy.
@param commentPolicy
the commentPolicy to set
Sets the contentNonXmlCharPolicy.
@param contentNonXmlCharPolicy
the contentNonXmlCharPolicy to set
Sets the contentSpacePolicy.
@param contentSpacePolicy
the contentSpacePolicy to set
Sets the xmlnsPolicy.
@param xmlnsPolicy
the xmlnsPolicy to set
Sets the html4ModeCompatibleWithXhtml1Schemata.
@param html4ModeCompatibleWithXhtml1Schemata
the html4ModeCompatibleWithXhtml1Schemata to set
@see org.xml.sax.Locator#getLineNumber()
@see org.xml.sax.Locator#getColumnNumber()
Returns the alreadyComplainedAboutNonAscii.
@return the alreadyComplainedAboutNonAscii
Returns the nextCharOnNewLine.
@return the nextCharOnNewLine
Returns the line.
@return the line
Returns the col.
@return the col
Gets a value indicating whether the parsing has been suspended.
Moved the constants (and pseude-enums) out of the TreeBuilder class.
Array version of U+FFFD.
An UTF-16 buffer that knows the start and end indeces of its unconsumed
content.
Constructor for wrapping an existing UTF-16 code unit array.
The backing buffer.
The index of the first character to consume.
The index immediately after the last character to consume.
Adjusts the start index to skip over the first character if it is a line
feed and the previous character was a carriage return.
Whether the previous character was a carriage return.
Gets the backing store of the buffer. May be larger than the logical content
of this UTF16Buffer.
Gets or sets the index of the first unconsumed character in the backing buffer.
Gets or sets the index of the slot immediately after the last character in the backing
buffer that is part of the logical content of this UTF16Buffer.
Determines whether this instance has data left.
true if there's data left; otherwise, false.
The tree builder glue for building a tree through the public DOM APIs.
The current doc.
Return the document fragment.
The document fragment
Returns the document.
The document
A class to parse and expose information about the byte order marks (BOM) for a stream.
Default constructor.
The stream to analyze.
Parses the input stream to obtain an encoding
Test if the header matches the bytes passed (up to the length of the array passed)
The buffer.
true if it succeeds, false if it fails.
Gets the encoding detected for the stream
The input stream stripped of the BOM
The original stream
Gets or sets the default encoding for the stream (if no BOM detected)
When true, indicates a valid BOM was detected
The document had no BOM, but was an XML document.
The options used when parsing strings of HTML
No options applied.
Default options (from Config.HtmlParsingOptions) are applied.
Tags may be self-closing.
Comments are ignored entirely.
The tree builder glue for building a tree through the public DOM APIs.
The current doc.
This is a fragment
Adds the attributes passed by parameter to the element.
The element.
The attributes.
Appends text a node.
The parent.
The text.
Move elements from one parent to another
The old parent.
The new parent.
Appends a doctype node to the document.
The name.
DocType public identifier
DocType system identifier.
Appends a comment node
The parent.
The comment.
Appends a comment to document root.
The comment.
Create a new element.
The namespace.
The node name.
The attributes.
The new element.
Creates the root HTML element.
The attributes.
The new HTML element.
Appends an element as a child of another element.
The child.
The parent.
Test whether the element has any children.
The element.
true if it has children, false if not.
Create a new element.
The namespace.
The node name.
The attributes.
The form.
The new element.
Run when the parsing process begins. Any config properties should be set here
This is a fragment.
Run when the document mode is set.
The mode.
DocType public identifier.
DocType system identifier.
true to HTML 4 specific addcional error checks.
Inserts foster parented characters.
The text.
The table.
The stack parent.
Inserts a foster parented child.
The child.
The table.
The stack parent.
Detach an element from its parent.
The element.
Combine a local name & uri into a single attribute name/.
Name of the local.
URI of the document.
The attribute name.
Returns the document.
The document.
Element factory to build a CsQuery DOM using HtmlParserSharp.
Size of the blocks to read from the input stream (char[] = 2x bytes)
Size of the preprocessor block; the maximum number of bytes in which the character set
encoding can be changed. This must be at least as large (IN BYTES!) as the tokenizer block or the
tokenizer won't quit before moving outside the preprocessor block.
Static constructor.
Creates a new document from a Stream of HTML using the options passed.
The HTML input.
The character set encoding used by the stream. If null, the BOM will be inspected, and it
will default to UTF8 if no encoding can be identified.
(optional) the parsing mode.
(optional) options for controlling the parsing.
(optional) type of the document.
A new document.
When true, the document's character set encoding has changed due to a meta http-equiv
directive. This can only happen once. After this we will change the encoding of the stream
from that point forward only.
This flag can be set during parsing if the character set encoding found in a meta tag is
different than the stream's current encoding.
The active stream.
The active stream reader.
The active encoding.
Given a TextReader, create a new IDomDocument from the input.
Thrown when an invalid data error condition occurs.
Thrown when the requested operation is invalid.
The HTML input.
The encoding.
A populated IDomDocument.
Gets a default context for a tag
The tag.
The context.
Gets a context by inspecting the beginning of a stream. Will restore the stream to its
unaltered state.
The HTML input.
[out] The context (e.g. the valid parent of the first tag name found).
The a new TextReader which is a clone of the original.
Event is called by the tokenizer when a content-encoding meta tag is found. We should just always return true.
The tokenizer
Encoding detected event information.
Configure default context: creates a default context for arbitrary fragments so they are valid no matter what,
so that true fragments can be created without concern for the context
Gets or sets the HTML parsing mode.
Gets or sets the HTML parsing mode.
Gets or sets the type of the document.
Gets or sets a context for the fragment, e.g. a tag name
The encoding was set from a META tag, allow it to be changed.
The methodology applied when parsing strings of HTML
Automatically detect the document type. When no DocType node is provided, will default to FragmentWithSelfClosingTags.
A fragment whose context is determined by the first tag.
A content block, assumed to be in BODY context.
A complete document; the HTML and BODY tag constructs will be addded if missing..
Simplify access to character set encodings for this system.
Try to get a character set encoding from its web name.
Name of the encoding.
[out] The encoding.
true if it succeeds, false if it fails.
Gets an encoding.
Name of the encoding.
The encoding.
A dictionary of all encodings available on this system
A dictionary of valid styles, based on a Visual Studio format XML schema.
Dictionary mapping style names to CssStyle style definitions
Bitfield of flags for specifying properties that may be tested on HTML tokens using a bitmap.
the element is an HTML block-level element
the attribute is a boolean property e.g. 'checked'
the tag is automatically closing, e.g. 'p'.
the tag may not have children
the tag may not have HTML children (but could possibly have children)
this tag causes an open p tag to close
The tag may appear in HEAD
election of attribute values is not case sensitive
Has a VALUE property
Element is a form input control
Creates a single virtual stream out of multiple input streams.
Base stream implementation
When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.
When overridden in a derived class, sets the position within the current stream.
When overridden in a derived class, sets the length of the current stream.
When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
When overridden in a derived class, gets a value indicating whether the current stream supports reading.
When overridden in a derived class, gets a value indicating whether the current stream supports seeking.
When overridden in a derived class, gets a value indicating whether the current stream supports writing.
When overridden in a derived class, gets the length in bytes of the stream.
When overridden in a derived class, gets or sets the position within the current stream.
Creates a single virtual stream out of multiple input streams.
The streams.
Creates a single virtual stream out of multiple input streams.
The streams.
Reads from the next stream available
Disposes of all remaining streams.
Gets a value indicating whether we can read.
Interface for an HttpWebRequest object.
Gets the response for the HttpWebRequest.
The response.
Gets a object to use to write request data.
A to use to write request data.
The method is called more than once.-or- is set to a value and is false.
In a .NET Compact Framework application, a request stream with zero content length was not obtained and closed correctly. For more information about handling zero content length requests, see Network Programming in the .NET Compact Framework.
was previously called.-or- The time-out period for the request expired.-or- An error occurred while processing the request.
The request cache validator indicated that the response for this request can be served from the cache; however, requests that write data must not use the cache. This exception can occur if you are using a custom cache validator that is incorrectly implemented.
The property is GET or HEAD.-or- is true, is false, is -1, is false, and is POST or PUT.
Cancels a request to an Internet resource.
Adds a byte range header to the request for a specified range.
The position at which to stop sending data.
The position at which to start sending data.
rangeSpecifier is invalid.
from is greater than to-or- from or to is less than 0.
The range header could not be added.
Adds a byte range header to a request for a specific range from the beginning or end of the requested data.
The starting or ending point of the range.
rangeSpecifier is invalid.
The range header could not be added.
Adds a range header to a request for a specified range.
The position at which to start sending data.
The position at which to stop sending data.
The description of the range.
rangeSpecifier is invalid.
rangeSpecifier is null.
from is greater than to-or- from or to is less than 0.
The range header could not be added.
Adds a range header to a request for a specific range from the beginning or end of the requested data.
The starting or ending point of the range.
The description of the range.
rangeSpecifier is invalid.
rangeSpecifier is null.
The range header could not be added.
Begins an asynchronous request for an Internet resource.
The callback.
The state.
An System.IAsyncResult that references the asynchronous request.
Ends an asynchronous request for an Internet resource.
The result.
Returns a System.Net.WebResponse.
Provides an asynchronous version of the System.Net.WebRequest.GetRequestStream() method.
The callback.
The state.
An System.IAsyncResult that references the asynchronous request.
returns a System.IO.Stream for writing data to the Internet resource.
The result.
A System.IO.Stream to write data to.
Gets or sets the HTTP method.
Gets or sets a value that indicates whether the request should follow redirection responses.
true if the request should automatically follow redirection responses from the Internet resource; otherwise, false. The default value is true.
Gets or sets a value that indicates whether to buffer the data sent to the Internet resource.
true to enable buffering of the data sent to the Internet resource; false to disable buffering. The default is true.
Gets a value that indicates whether a response has been received from an Internet resource.
true if a response has been received; otherwise, false.
Gets or sets a value that indicates whether to make a persistent connection to the Internet resource.
true if the request to the Internet resource should contain a Connection HTTP header with the value Keep-alive; otherwise, false. The default is true.
Gets or sets a value that indicates whether to pipeline the request to the Internet resource.
true if the request should be pipelined; otherwise, false. The default is true.
Gets or sets a value that indicates whether to send an authenticate header with the request.
true to send a WWW-authenticate HTTP header with requests after authentication has taken place; otherwise, false. The default is false.
Gets or sets a value that indicates whether to allow high-speed NTLM-authenticated connection sharing.
true to keep the authenticated connection open; otherwise, false.
Gets or sets a value that indicates whether to send data in segments to the Internet resource.
true to send data to the Internet resource in segments; otherwise, false. The default value is false.
The request has been started by calling the , , , or method.
Gets or sets the type of decompression that is used.
A T:System.Net.DecompressionMethods object that indicates the type of decompression that is used.
The object's current state does not allow this property to be set.
Gets or sets the maximum allowed length of the response headers.
The length, in kilobytes (1024 bytes), of the response headers.
The property is set after the request has already been submitted.
The value is less than 0 and is not equal to -1.
Gets or sets the collection of security certificates that are associated with this request.
The that contains the security certificates associated with this request.
The value specified for a set operation is null.
Gets or sets the cookies associated with the request.
A that contains the cookies associated with this request.
Gets the original Uniform Resource Identifier (URI) of the request.
A that contains the URI of the Internet resource passed to the method.
Gets or sets the Content-length HTTP header.
The number of bytes of data to send to the Internet resource. The default is -1, which indicates the property has not been set and that there is no request data to send.
The new value is less than 0.
The request has been started by calling the , , , or method.
Gets or sets the time-out value for the and methods.
The number of milliseconds to wait before the request times out. The default is 100,000 milliseconds (100 seconds).
The value specified is less than zero and is not .
Gets or sets a time-out when writing to or reading from a stream.
The number of milliseconds before the writing or reading times out. The default value is 300,000 milliseconds (5 minutes).
The value specified for a set operation is less than or equal to zero and is not equal to
The request has already been sent.
Gets the Uniform Resource Identifier (URI) of the Internet resource that actually responds to the request.
A that identifies the Internet resource that actually responds to the request. The default is the URI used by the method to initialize the request.
Gets the service point to use for the request.
A that represents the network connection to the Internet resource.
Gets or sets the maximum number of redirects that the request follows.
The maximum number of redirection responses that the request follows. The default value is 50.
The value is set to 0 or less.
Gets or sets authentication information for the request.
An that contains the authentication credentials associated with the request. The default is null.
Gets or sets a value that controls whether default credentials are sent with requests.
true if the default credentials are used; otherwise false. The default value is false.
You attempted to set this property after the request was sent.
Gets or sets the name of the connection group for the request.
The name of the connection group for this request. The default value is null.
Specifies a collection of the name/value pairs that make up the HTTP headers.
A that contains the name/value pairs that make up the headers for the HTTP request.
The request has been started by calling the , , , or method.
Gets or sets proxy information for the request.
The object to use to proxy the request. The default value is set by calling the property.
The caller does not have permission for the requested operation.
is set to null.
The request has been started by calling , , , or .
Gets or sets the version of HTTP to use for the request.
The HTTP version to use for the request. The default is .
The HTTP version is set to a value other than 1.0 or 1.1.
Gets or sets the value of the Content-type HTTP header.
The value of the Content-type HTTP header. The default value is null.
Gets or sets the media type of the request.
The media type of the request. The default value is null.
Gets or sets the value of the Transfer-encoding HTTP header.
The value of the Transfer-encoding HTTP header. The default value is null.
is set when is false.
is set to the value "Chunked".
Gets or sets the value of the Connection HTTP header.
The value of the Connection HTTP header. The default value is null.
The value of is set to Keep-alive or Close.
Gets or sets the value of the Accept HTTP header.
The value of the Accept HTTP header. The default value is null.
Gets or sets the value of the Referer HTTP header.
The value of the Referer HTTP header. The default value is null.
Gets or sets the value of the User-agent HTTP header.
The value of the User-agent HTTP header. The default value is null.The value for this property is stored in . If WebHeaderCollection is set, the property value is lost.
Gets or sets the value of the Expect HTTP header.
The contents of the Expect HTTP header. The default value is null.The value for this property is stored in . If WebHeaderCollection is set, the property value is lost.
Expect is set to a string that contains "100-continue" as a substring.
Gets or sets the value of the If-Modified-Since HTTP header.
A that contains the contents of the If-Modified-Since HTTP header. The default value is the current date and time.
Interface for an object that creates HttpWebRequest objects.
Creates a concrete HttpWebRequest
URL of the document.
A new HttpWebRequest
Interface for an HTTP web response.
Gets the contents of a header that was returned with the response.
The contents of the specified header.
The header value to return.
The current instance has been disposed.
When overridden by a descendant class, closes the response stream.
Any attempt is made to access the method, when the method is not overridden in a descendant class.
When overridden in a descendant class, returns the data stream from the Internet resource.
An instance of the class for reading data from the Internet resource.
Any attempt is made to access the method, when the method is not overridden in a descendant class.
Gets or sets the cookies that are associated with this response.
A that contains the cookies that are associated with this response.
The current instance has been disposed.
Gets the method that is used to encode the body of the response.
A string that describes the method that is used to encode the body of the response.
The current instance has been disposed.
Gets the character set of the response.
A string that contains the character set of the response.
The current instance has been disposed.
Gets the name of the server that sent the response.
A string that contains the name of the server that sent the response.
The current instance has been disposed.
Gets the last date and time that the contents of the response were modified.
A that contains the date and time that the contents of the response were modified.
The current instance has been disposed.
Gets the status of the response.
One of the values.
The current instance has been disposed.
Gets the status description returned with the response.
A string that describes the status of the response.
The current instance has been disposed.
Gets the version of the HTTP protocol that is used in the response.
A that contains the HTTP protocol version of the response.
The current instance has been disposed.
Gets the method that is used to return the response.
A string that contains the HTTP method that is used to return the response.
The current instance has been disposed.
Gets a value that indicates whether this response was obtained from the cache.
true if the response was taken from the cache; otherwise, false.
Gets a value that indicates whether mutual authentication occurred.
true if both client and server were authenticated; otherwise, false.
When overridden in a descendant class, gets or sets the content length of data being received.
The number of bytes returned from the Internet resource.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
When overridden in a derived class, gets or sets the content type of the data being received.
A string that contains the content type of the response.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
When overridden in a derived class, gets the URI of the Internet resource that actually responded to the request.
An instance of the class that contains the URI of the Internet resource that actually responded to the request.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
When overridden in a derived class, gets a collection of header name-value pairs associated with this request.
An instance of the class that contains header values associated with this response.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
Creates a web request that does basic auth
Creates a web request that does basic auth.
HTTP username.
HTTP password.
Creates a web request for a url
URL of the document.
A new IHttpWebRequest
Creates a concrete HttpWebRequest for a URI
URI of the document.
A new IHttpWebRequest.
HTTP web request adapter.
Creates an HttpWebRequestAdapter from a .NET HttpWebRequest
The HttpWebRequestAdapter.
Gets the response for the HttpWebRequest.
The response.
Begins an asynchronous request for an Internet resource.
The callback.
The state.
An System.IAsyncResult that references the asynchronous request.
Ends an asynchronous request for an Internet resource.
The result.
Returns a System.Net.WebResponse.
Provides an asynchronous version of the System.Net.WebRequest.GetRequestStream() method.
The callback.
The state.
An System.IAsyncResult that references the asynchronous request.
returns a System.IO.Stream for writing data to the Internet resource.
The result.
A System.IO.Stream to write data to.
Gets a object to use to write request data.
A to use to write request data.
The method is called more than once.-or- is set to a value and is false.
In a .NET Compact Framework application, a request stream with zero content length was not obtained and closed correctly. For more information about handling zero content length requests, see Network Programming in the .NET Compact Framework.
was previously called.-or- The time-out period for the request expired.-or- An error occurred while processing the request.
The request cache validator indicated that the response for this request can be served from the cache; however, requests that write data must not use the cache. This exception can occur if you are using a custom cache validator that is incorrectly implemented.
The property is GET or HEAD.-or- is true, is false, is -1, is false, and is POST or PUT.
Cancels a request to an Internet resource.
Adds a byte range header to the request for a specified range.
The position at which to stop sending data.
The position at which to start sending data.
rangeSpecifier is invalid.
from is greater than to-or- from or to is less than 0.
The range header could not be added.
Adds a byte range header to a request for a specific range from the beginning or end of the requested data.
The starting or ending point of the range.
rangeSpecifier is invalid.
The range header could not be added.
Adds a range header to a request for a specified range.
The position at which to start sending data.
The position at which to stop sending data.
The description of the range.
rangeSpecifier is invalid.
rangeSpecifier is null.
from is greater than to-or- from or to is less than 0.
The range header could not be added.
Adds a range header to a request for a specific range from the beginning or end of the requested data.
The starting or ending point of the range.
The description of the range.
rangeSpecifier is invalid.
rangeSpecifier is null.
The range header could not be added.
Gets or sets the HTTP method.
Gets or sets a value that indicates whether the request should follow redirection responses.
true if the request should automatically follow redirection responses from the Internet resource; otherwise, false. The default value is true.
Gets or sets a value that indicates whether to buffer the data sent to the Internet resource.
true to enable buffering of the data sent to the Internet resource; false to disable buffering. The default is true.
Gets a value that indicates whether a response has been received from an Internet resource.
true if a response has been received; otherwise, false.
Gets or sets a value that indicates whether to make a persistent connection to the Internet resource.
true if the request to the Internet resource should contain a Connection HTTP header with the value Keep-alive; otherwise, false. The default is true.
Gets or sets a value that indicates whether to pipeline the request to the Internet resource.
true if the request should be pipelined; otherwise, false. The default is true.
Gets or sets a value that indicates whether to send an authenticate header with the request.
true to send a WWW-authenticate HTTP header with requests after authentication has taken place; otherwise, false. The default is false.
Gets or sets a value that indicates whether to allow high-speed NTLM-authenticated connection sharing.
true to keep the authenticated connection open; otherwise, false.
Gets or sets a value that indicates whether to send data in segments to the Internet resource.
true to send data to the Internet resource in segments; otherwise, false. The default value is false.
The request has been started by calling the , , , or method.
Gets or sets the type of decompression that is used.
A T:System.Net.DecompressionMethods object that indicates the type of decompression that is used.
The object's current state does not allow this property to be set.
Gets or sets the maximum allowed length of the response headers.
The length, in kilobytes (1024 bytes), of the response headers.
The property is set after the request has already been submitted.
The value is less than 0 and is not equal to -1.
Gets or sets the collection of security certificates that are associated with this request.
The that contains the security certificates associated with this request.
The value specified for a set operation is null.
Gets or sets the cookies associated with the request.
A that contains the cookies associated with this request.
Gets the original Uniform Resource Identifier (URI) of the request.
A that contains the URI of the Internet resource passed to the method.
Gets or sets the Content-length HTTP header.
The number of bytes of data to send to the Internet resource. The default is -1, which indicates the property has not been set and that there is no request data to send.
The new value is less than 0.
The request has been started by calling the , , , or method.
Gets or sets the time-out value for the and methods.
The number of milliseconds to wait before the request times out. The default is 100,000 milliseconds (100 seconds).
The value specified is less than zero and is not .
Gets or sets a time-out when writing to or reading from a stream.
The number of milliseconds before the writing or reading times out. The default value is 300,000 milliseconds (5 minutes).
The value specified for a set operation is less than or equal to zero and is not equal to
The request has already been sent.
Gets the Uniform Resource Identifier (URI) of the Internet resource that actually responds to the request.
A that identifies the Internet resource that actually responds to the request. The default is the URI used by the method to initialize the request.
Gets the service point to use for the request.
A that represents the network connection to the Internet resource.
Gets or sets the maximum number of redirects that the request follows.
The maximum number of redirection responses that the request follows. The default value is 50.
The value is set to 0 or less.
Gets or sets authentication information for the request.
An that contains the authentication credentials associated with the request. The default is null.
Gets or sets a value that controls whether default credentials are sent with requests.
true if the default credentials are used; otherwise false. The default value is false.
You attempted to set this property after the request was sent.
Gets or sets the name of the connection group for the request.
The name of the connection group for this request. The default value is null.
Specifies a collection of the name/value pairs that make up the HTTP headers.
A that contains the name/value pairs that make up the headers for the HTTP request.
The request has been started by calling the , , , or method.
Gets or sets proxy information for the request.
The object to use to proxy the request. The default value is set by calling the property.
The caller does not have permission for the requested operation.
is set to null.
The request has been started by calling , , , or .
Gets or sets the version of HTTP to use for the request.
The HTTP version to use for the request. The default is .
The HTTP version is set to a value other than 1.0 or 1.1.
Gets or sets the value of the Content-type HTTP header.
The value of the Content-type HTTP header. The default value is null.
Gets or sets the media type of the request.
The media type of the request. The default value is null.
Gets or sets the value of the Transfer-encoding HTTP header.
The value of the Transfer-encoding HTTP header. The default value is null.
is set when is false.
is set to the value "Chunked".
Gets or sets the value of the Connection HTTP header.
The value of the Connection HTTP header. The default value is null.
The value of is set to Keep-alive or Close.
Gets or sets the value of the Accept HTTP header.
The value of the Accept HTTP header. The default value is null.
Gets or sets the value of the Referer HTTP header.
The value of the Referer HTTP header. The default value is null.
Gets or sets the value of the User-agent HTTP header.
The value of the User-agent HTTP header. The default value is null.The value for this property is stored in . If WebHeaderCollection is set, the property value is lost.
Gets or sets the value of the Expect HTTP header.
The contents of the Expect HTTP header. The default value is null.The value for this property is stored in . If WebHeaderCollection is set, the property value is lost.
Expect is set to a string that contains "100-continue" as a substring.
Gets or sets the value of the If-Modified-Since HTTP header.
A that contains the contents of the If-Modified-Since HTTP header. The default value is the current date and time.
Defaut HTTP web request factory; creates instances of .NET framework classes.
Creates an HttpWebRequestAdapter wrapping a .NET framework HttpWebRequest object.
URL of the document.
A new HttpWebRequestAdapter
Creates an HttpWebRequestAdapter wrapping a .NET framework HttpWebRequest object.
URL of the document.
A new HttpWebRequestAdapter
An HTTP web request method (GET or POST).
The GET method
The POST method
Returns a string that represents the current object.
A string representation of the web method.
Creates a new HttpWebRequestMethod from a string
The string.
A new HttpWebRequestMethod
HTTP web response adapter
Create a new HttpWebResponseAdapter from a .NET WebResponse
The HttpWebResponseAdapter.
Gets the contents of a header that was returned with the response.
The contents of the specified header.
The header value to return.
The current instance has been disposed.
When overridden by a descendant class, closes the response stream.
Any attempt is made to access the method, when the method is not overridden in a descendant class.
When overridden in a descendant class, returns the data stream from the Internet resource.
An instance of the class for reading data from the Internet resource.
Any attempt is made to access the method, when the method is not overridden in a descendant class.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
2
Gets or sets the cookies that are associated with this response.
A that contains the cookies that are associated with this response.
The current instance has been disposed.
Gets the method that is used to encode the body of the response.
A string that describes the method that is used to encode the body of the response.
The current instance has been disposed.
Gets the character set of the response.
A string that contains the character set of the response.
The current instance has been disposed.
Gets the name of the server that sent the response.
A string that contains the name of the server that sent the response.
The current instance has been disposed.
Gets the last date and time that the contents of the response were modified.
A that contains the date and time that the contents of the response were modified.
The current instance has been disposed.
Gets the status of the response.
One of the values.
The current instance has been disposed.
Gets the status description returned with the response.
A string that describes the status of the response.
The current instance has been disposed.
Gets the version of the HTTP protocol that is used in the response.
A that contains the HTTP protocol version of the response.
The current instance has been disposed.
Gets the method that is used to return the response.
A string that contains the HTTP method that is used to return the response.
The current instance has been disposed.
Gets a value that indicates whether this response was obtained from the cache.
true if the response was taken from the cache; otherwise, false.
Gets a value that indicates whether mutual authentication occurred.
true if both client and server were authenticated; otherwise, false.
When overridden in a descendant class, gets or sets the content length of data being received.
The number of bytes returned from the Internet resource.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
When overridden in a derived class, gets or sets the content type of the data being received.
A string that contains the content type of the response.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
When overridden in a derived class, gets the URI of the Internet resource that actually responded to the request.
An instance of the class that contains the URI of the Internet resource that actually responded to the request.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
When overridden in a derived class, gets a collection of header name-value pairs associated with this request.
An instance of the class that contains header values associated with this response.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
A basic implementation for a WebResponse
Gets the contents of a header that was returned with the response.
The contents of the specified header.
The header value to return.
The current instance has been disposed.
Gets or sets the cookies that are associated with this response.
A that contains the cookies that are associated with this response.
The current instance has been disposed.
Gets the method that is used to encode the body of the response.
A string that describes the method that is used to encode the body of the response.
The current instance has been disposed.
Gets the character set of the response.
A string that contains the character set of the response.
The current instance has been disposed.
Gets the name of the server that sent the response.
A string that contains the name of the server that sent the response.
The current instance has been disposed.
Gets the last date and time that the contents of the response were modified.
A that contains the date and time that the contents of the response were modified.
The current instance has been disposed.
Gets the status of the response.
One of the values.
The current instance has been disposed.
Gets the status description returned with the response.
A string that describes the status of the response.
The current instance has been disposed.
Gets the version of the HTTP protocol that is used in the response.
A that contains the HTTP protocol version of the response.
The current instance has been disposed.
Gets the method that is used to return the response.
A string that contains the HTTP method that is used to return the response.
The current instance has been disposed.
Creates a virtual TextReader from several other streams.
Create a new virtual TextReader by combining, in sequence, the streams provided as parameters to the constructor
A variable-length parameters list containing readers.
The readers.
Closes the and releases any system resources associated
with the TextReader.
Releases the unmanaged resources used by the and
optionally releases the managed resources.
true to release both managed and unmanaged resources; false to release only unmanaged
resources.
Reads the next character without changing the state of the reader or the character source.
Returns the next available character without actually reading it from the input stream.
An integer representing the next character to be read, or -1 if no more characters are
available or the stream does not support seeking.
Reads the next character from the input stream and advances the character position by one
character.
The next character from the input stream, or -1 if no more characters are available. The
default implementation returns -1.
Reads a maximum of characters from the current stream and writes
the data to , beginning at .
When this method returns, contains the specified character array with the values between
and ( + - 1)
replaced by the characters read from the current source.
The position in at which to begin writing.
The maximum number of characters to read. If the end of the stream is reached before
of characters is read into , the current
method returns.
The number of characters that have been read. The number will be less than or equal to
, depending on whether the data is available within the stream. This
method returns zero if called when no more characters are left to read.
###
is null.
###
The buffer length minus is less than .
###
or is negative.
###
The is closed.
###
An I/O error occurs.
Reads a maximum of characters from the current stream, and writes
the data to , beginning at .
When this method returns, this parameter contains the specified character array with the
values between and ( +
-1) replaced by the characters read from the current source.
The position in at which to begin writing.
The maximum number of characters to read.
The position of the underlying stream is advanced by the number of characters that were read
into .The number of characters that have been read. The number will
be less than or equal to , depending on whether all input characters
have been read.
Reads a line of characters from the current stream and returns the data as a string. Note:
this method will not combine data from two boundary streams into a single line; the end of a
stream is always the end of a line. This could result in stream corruption (e.g. the addition
of newlines between streams) when using this method.
The next line from the input stream, or null if all characters have been read.
Reads all characters from the current position to the end of the TextReader and returns them
as one string.
A string containing all characters from the current position to the end of the TextReader.
Creates object reference. (Overridden because it's implemented by the base class and we want
to be sure that anything trying to use this will fail).
Thrown when the requested operation is unimplemented.
Type of the requested.
Always fails.
Initializes the lifetime service. (Overridden because it's implemented by the base class and we want
to be sure that anything trying to use this will fail).
Thrown when the requested operation is unimplemented.
Always fails
Advance to the next reader
true if it succeeds, false if it fails.
Returns a hash code for this object.
The hash code for this object.
Tests if this object is considered equal to another.
The object to compare to this object.
true if the objects are considered equal, false if they are not.
Gets the current stream
A string comparer that is not concerned with anything other than the raw value of the characters. No encoding, no culture.
Compares two string objects to determine their relative ordering.
String to be compared.
String to be compared.
Negative if 'x' is less than 'y', 0 if they are equal, or positive if it is greater.
Marginally faster when just testing equality than using Compare
String to be compared.
String to be compared.
true if it succeeds, false if it fails.
Tests if two string objects are considered equal.
String to be compared.
String to be compared.
true if the objects are considered equal, false if they are not.
Calculates the hash code for this object.
The object.
The hash code for this object.
Gets an instance of TrueStringComparer
A string comparer that is not concerned with anything other than the raw value of the characters. No encoding, no culture.
Compares two string objects to determine their relative ordering.
String to be compared.
String to be compared.
Negative if 'x' is less than 'y', 0 if they are equal, or positive if it is greater.
Marginally faster when just testing equality than using Compare
String to be compared.
String to be compared.
true if it succeeds, false if it fails.
Tests if two string objects are considered equal.
String to be compared.
String to be compared.
true if the objects are considered equal, false if they are not.
Calculates the hash code for this object.
The object.
The hash code for this object.
Gets an instance of TrueStringComparer
Full HTML encoder. All entities with known HTML codes are parsed; everything above 160
becomes an HTML numeric-coded entity.
Standard HTML encoder. This parses less-than, greater-than, ampersand, double-qoute, and non-
breaking space into HTML entities, plus all characters above ascii 160 into ther HTML numeric-
coded equivalent.
Abstract base class for custom HTML encoder implementations
Interface for HTML encoder/decoder
Encodes text as HTML, writing the processed output to the TextWriter.
The text to be encoded.
The target for the ouput
Determines of a character must be encoded; if so, encodes it as the output parameter and
returns true; if not, returns false.
The text string to encode.
[out] The encoded string.
True if the character was encoded.
Determines of a character must be encoded (for unicode chars using astral planes); if so,
encodes it as the output parameter and returns true; if not, returns false. This method will
be passed the integral representation of the mult-byte unicode character. If the method
returns false, then the character will be output as the orginal two-byte sequence.
The text string to encode.
[out] The encoded string.
True if the character was encoded.
Encodes text as HTML, writing the processed output to the TextWriter.
The text to be encoded.
The target for the ouput.
Determines of a character must be encoded; if so, encodes it as the output parameter and
returns true; if not, returns false.
The text string to encode.
[out] The encoded string.
True if the character was encoded.
Determines of a character must be encoded (for unicode chars using astral planes); if so,
encodes it as the output parameter and returns true; if not, returns false. This method will
be passed the integral representation of the mult-byte unicode character. If the method
returns false, then the character will be output as the orginal two-byte sequence.
The text string to encode.
[out] The encoded string.
True if the character was encoded.
Encodes an integer as an HTML numeric coded entity e.g. &#nnn;
The value.
An HTML string.
Default constructor.
Determines of a character must be encoded; if so, encodes it as the output parameter and
returns true; if not, returns false.
The text string to encode.
[out] The encoded string.
True if the character was encoded.
Minimum HTML encoder (including nonbreaking space). This only parses the absolute minimum
required for correct interpretation (less-than, greater-than, ampersand), plus non-breaking
space. Everthing else is passed through.
Minimum HTML encoder. This only parses the absolute minimum required for correct
interpretation (less-than, greater-than, ampersand). Everthing else is passed through.
Determines of a character must be encoded; if so, encodes it as the output parameter and
returns true; if not, returns false.
The text string to encode.
[out] The encoded string.
True if the character was encoded.
Overrides default astral plane encoding, causing unicode characters to never be HTML encoded.
The text string to encode.
[out] Null always (never encodes)
False always (never encodes)
Determines of a character must be encoded; if so, encodes it as the output parameter and
returns true; if not, returns false.
The text string to encode.
[out] The encoded string.
True if the character was encoded.
Factory for HTML encoders included with CsQuery
The standard HTML encoder; encodes most entities, and any characters that are above ascii 160.
The minimum HTML encoder; only encodes left-caret, right-caret, and ampersand. All other
characters are passed through.
The same as the minimum HTML encoder, but also encodes nonbreaking space (ascii 160 becomes
).
No HTML encoding -- all characters are passed through. Will likely produce invalid HTML.
Full HTML encoding -- all entities mapped to their named (not numeric) entities when
available.
The default HTML encoder
Minimum HTML encoder. This only parses the absolute minimum required for correct
interpretation (less-than, greater-than, ampersand). Everthing else is passed through.
Encodes text as HTML, writing the processed output to the TextWriter.
The text to be encoded.
The target for the ouput.
Default output formatter.
Interface for an OutputFormatter. This is an object that renders a CsQuery tree to a TextWriter
Renders this object to the passed TextWriter
The node.
The writer.
Renders this object and returns the output as a string
The node.
A string of HTML
Abstract base class constructor.
Options for controlling the operation.
The encoder.
Creates the default OutputFormatter using default DomRenderingOption values and default HtmlEncoder
Renders the object to the textwriter.
Thrown when the requested operation is unimplemented.
The node.
The writer to which output is written.
Renders the object to a string.
The node.
A string.
Gets the HTML representation of this element and its children.
The element to render.
The writer to which output is written.
true to include, false to exclude the children.
Renders the children of this element.
The element to render.
The writer to which output is written.
Gets the HTML representation of this element and its children. (This is the implementation -
it will not flush the stack)
The element to render.
The writer to which output is written.
true to include, false to exclude the children.
Adds the element close tag to the output stack.
The element.
Process the output stack.
Thrown when the requested operation is unimplemented.
Renders a sequence of elements.
The elements.
The writer to which output is written.
Renders the element close tag.
The element.
The writer to which output is written.
Renders all the children of the passed node.
The element.
Renders the text node.
The text node.
The writer to which output is written.
true to raw.
Renders a CDATA node.
The element to render
The writer to which output is written.
Renders the comment node.
The element to render
The writer to which output is written.
Renders the document type node.
The element to render
The writer to which output is written.
Render an attribute.
The writer to which output is written.
The name of the attribute.
The attribute value.
true to require quotes around the attribute value, false to use quotes only if needed.
Merge options with defaults when needed.
Stack of the output tree
An element that captures the state of a element on the output stack.
Constructor.
The element.
true if this object is raw.
true if this object is close.
The element.
The text node should be output as raw (un-encoded) text.
The is a closing tag only.
Factory for OuputFormatters included with CsQuery.
Creates an instance of the default OutputFormatter using the options passed.
(optional) options for controlling the operation.
(optional) the encoder.
An OutputFormatter.
Creates an instance of the default OutputFormatter using the options passed and the default encoder.
(optional) options for controlling the operation.
An OutputFormatter.
Creates an instance of the default OutputFormatter using the default options and the encoder
passed.
(optional) the encoder.
An OutputFormatter.
Merge options with defaults when needed
(optional) options for controlling the operation.
Gets an instance of the default OuputFormatter configured with the default HTML encoder and options
Gets an instance of the default OuputFormatter configured with no HTML encoding
Gets an instance of the default OuputFormatter configured with basic encoding
Gets an instance of the default OuputFormatter configured for full HTML encoding
Gets an instance of the default OutputFormatter, using the minimum HTML encoding scheme.
Gets an instance of the default OutputFormatter, using the minimum HTML + NBSP encoding scheme.
An OutputFormatter that returns a basic ASCII version of the HTML document.
A promise that resolves or fails after a certain amount of time
Interface for a promise that accepts a strongly-typed parameter.
The type of data accepted by the resolution parameter.
A promise is an object exposing "Then" which will be called on the resoluton of a particular process.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will be chained to this promise.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will be chained to this promise.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise
The success delegate.
(optional) the failure delegate.
A promise
Chains delegates that will be executed on success or failure of a promise.
The success delegate.
(optional) the failure delegate.
A promise.
Create a new Timeout that rejects after the specified time.
The timeout in milliseconds.
Create a new Timeout that rejects with the provided parameter value after the specified time.
The timeout in milliseconds.
The parameter value.
Create a new Timeout that resolves or rejects with the provided parameter value after the specified time.
The timeout in milliseconds.
true to resolve the promise on the timeout, false to reject it.
Create a new Timeout that resolves or rejects with the provided parameter value after the specified time.
The timeout in milliseconds.
The parameter value.
true to resolve the promise on the timeout, false to reject it.
Stops the timer with the specified resolution.
True to resolve the promise, false to reject it.
Stops the timer with it's default resolution
Event handler called when the specified time has elapsed.
The timer object.
Elapsed event information.
Completes the promise promise using the specified resolution
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
A promise that resolves or fails after a certain amount of time
Create a new Timeout that rejects after the specified time.
The timeout in milliseconds.
Create a new Timeout that rejects with the provided parameter value after the specified time.
The timeout in milliseconds.
The parameter value.
Create a new Timeout that resolves or rejects with the provided parameter value after the specified time.
The timeout in milliseconds.
true to resolve the promise on the timeout, false to reject it.
Create a new Timeout that resolves or rejects with the provided parameter value after the specified time.
The timeout in milliseconds.
The parameter value.
true to resolve the promise on the timeout, false to reject it.
A static class to provide attribute information about characters, e.g. determining whether or
not it belongs to a number of predefined classes. This creates an array of every possible
character with a uint that is a bitmap (of up to 32 possible values)
This permits very fast access to this information since it only needs to be looked up via an
index. Uses an array of 65536 uints = 256K of memory.
Configuration of the xref of character info. This sets bitflags in the "characterFlags" array
for every unicode value that defines its attributes. This creates a lookup table allowing
very rapid access to metadata about a single character, useful during string-parsing and
scanning.
An array of all HTML "space" characters.
Creates a new instance of the CharacterInfo class
The new character information.
Creates a new instance of the CharacterInfo class.
The character to bind to the new instance.
A new CharacterInfo instance.
Creates a new StringInfo instance
The new StringInfo instance
Creates a new StringInfo instance bound to a string
The string to bind.
The new StringInfo instance.
Test whether a character matches a set of flags defined by the paramter
The character to test
The type to which to compare the character
true if the character matches the flags in the test type, false if not
Gets a type with all flags set for the types implemented by this character
The character to test
The type.
Return the closing character for a set of known opening enclosing characters (including
single and double quotes)
Thrown when the character is not a known opening bound
The opening bound character
The closing bound character
Return the matching bound for known opening and closing bound characters (same as Closer, but
accepts closing tags and returns openers)
Thrown when the requested operation is invalid.
The opening bound character
The matching close character
Sets the bits for ISO 10646.
the target
Matches anything but the first character for a valid HTML attribute name.
the target
We omit ":" as a valid name start character because it makes pseudoselectors impossible to parse.
Similar to above, we omit "." as a valid in-name char because it breaks chained CSS selectors.
Add the : back in when actually parsing html
Add the . back in when actually parsing html
Bitfield of flags for specifying characteristics of a single character
Whitespace
Alpha charactersonly
Numeric characters only
Numbers plus non-numeric characters that can be part of a number
Lowercase only
Uppercase only.
A mathematical operator; something that can be part of a math formiul;a.
A character that has a mate, such as ( or ].
A single or double quote.
Backslash.
Comma, space or pipe.
ISO10646 character set excluding numbers
Something that can be the first character of an HTML tag selector (not tag name).
Something that can be anthing other than the 1st character of an HTML tag selector.
A character that marks the end of an HTML tag opener (e.g. the end of the entire tag, or
the beginning of the attribute section)
<, >, or / -- any character that's part of the construct of an html tag;
finding one of these while seeking attribute names means the tag was closed.
Something that can be the first character of a legal HTML tag name.
Something that can be anything other than the 1st character of a legal HTML tag name.
Something that can be a character of a legal HTML ID value.
Terminates a selector or part of a selector
An HTML "space" is actually different from "white space" which is defined in the HTML5 spec
as UNICODE whitespace and is a lot of characters. But we are generally only concerned with
"space" characters which delimit parts of tags and so on.
A character that must be HTML encoded to create valid HTML
A character that will terminate an unquoted HTML attribute value.
Part of a hex string
Extension methods used by CsQuery but not specialized enough to be considered useful for clients; therefore
in a separate namespace.
Returns the text between startIndex and endIndex (exclusive of endIndex)
Returns the text between startIndex and endIndex (exclusive of endIndex)
The source text
The start index
The end index
The substring, or an empty string if the range was not within the string.
An interface that describes characterstics of a single character.
Interface for a strongly typed IValueInfo
The type of value
Interface for characterstics of a value, either a single character or a string.
The value is alphabetic
The value is numeric.
The value is numeric, or characters that can be parts of numbers (+,-,.)
The value is all lowercase
Gets a value indicating whether the cvale upper.
The value is whitespace.
The value is alphanumeric.
The value is a math operator
Indicates that a character is alphabetic-like character defined as a-z, A-Z, hyphen,
underscore, and ISO 10646 code U+00A1 and higher. (per characters allowed in CSS identifiers)
The bound character or string for this instance. This is the character against which all
tests are performed.
The target of the tests.
The character is an opening or closing parenthesis.
The character is an enclosing type such as a parenthesis or curly brace (anything which has a
matching close that's not the same as the opening; this specifically excludes single and
double-quote characters).
Gets a value indicating whether the character is any bounding type (includes all Enclosing types, plus quotes).
Gets a value indicating whether the character is a quote.
Gets a value indicating whether the character is a separator (a space, or pipe)
An interface for pattern matching.
Something implementing this interface will be used as follows:
First, Initialize is called, passing in the source and the starting index where scanning
should begin.
The Validate function then scans the string, and returns true if a valid match is found, and
false if not.
The Result property should be populated by the function with the matching string, and the
EndIndex property should be populated with the last position scanned (one after the last
valid character that was returned). If no valid string was matched, EndIndex should equal the
original StartIndex.
Initializes the pattern
The start index.
Source for the.
Validate the string and try to match something.
true if a matching string was found, false if not.
When a valid string was found, the string.
A string.
Gets zero-based index of the ending postion. This is one position after the last matching
character.
The end index.
A class that provides methods with metadata about a character.
Create a new unbound CharacterInfo class
Create a new CharacterInfo class bound to a character.
The character.
CharacterInfo casting operator: creates a new instance from a single character
The character to bind to the new CharacterInfo class
Creates a new CharacterInfo instance from a character
The character to bind to this instance.
A new CharacterInfo object
Returns a string that is the current target
The current target as a string
Gets or sets bound character for this instance. This is the character against which all tests
are performed.
Flags indicating the use of this character.
Gets a value indicating whether the character is alphabetic, e.g. a-z, A-Z
Gets a value indicating whether the bound character is numeric only, e.g. 0-9
Test whether the character is numeric or part of a complete number, e.g. also includes '+', '-
' and '.'.
Test whether the character is lower-case
Test whether the character is upper-case
Test whether the character is whitespace. This is really HTML5 "space" and not ANSI
whitespace which. HTML5 space is much more restrictive; this is generally used to test
whether a character delimits an entity during HTML/CSS/HTML-related parsing.
The value is alphanumeric.
The value is a math operator.
Enclosing, plus double and single quotes
Tests whether the character is an enclosing/bounding type, one of:
()[]{}<>`´“”«».
Tests whether the bound character is a single- or double-quote
Tests whether the bound character is an opening or closing parenthesis.
Gets a value indicating whether the character is a separator (a space, or pipe)
Indicates that a character is alphabetic-like character defined as a-z, A-Z, hyphen,
underscore, and ISO 10646 code U+00A1 and higher. (per characters allowed in CSS identifiers)
Abstract base class for IExpectPattern. This implements some helper functions that are commonly used by patterns.
ICharacterInfo wrapper arond the current character. This class provides methods to test a
character for certain properties.
The source string being scanned
The starting index within the source string
The total length of the source string
Initializes the pattern. This is called before any scanning begins.
The index within the source string to begin scanning.
The source string.
Run the validation against the passed string
Returns true if the pattern defined by this class is successfully matched, and false if not.
Test if a string matches a substring in the source
The index within the source string to begin scanning.
The substring to match
true if it succeeds, false if it fails.
Copy the source to an output string between startIndex and endIndex (exclusive), optionally
unescaping part of it.
The starting index to begin copying.
The ending index
true to honor quotes within the output string, false to treat them as any other characer.
The ouput.
Copy the source to an output string between startIndex and endIndex (exclusive), optionally
unescaping part of it.
Thrown when the requested operation is invalid.
The starting index to begin copying.
The ending index.
true to honor quotes within the output string, false to treat them as any other characer.
true to strip quotes.
The ouput.
Try parse escape character.
The character.
[out] The new value.
true if it succeeds, false if it fails.
Gets or sets zero-based index of the ending postion. This is one position after the last
matching character.
The end index.
When a valid string was found, the string.
A string.
A StringInfo object: provides methods to test a string for certain properties.
Interface that describes characterstics of a string
The string is a valid HTML attribute name
The string contains alpha characters.
Default constructor.
Constructor using the string passed
The target of the new StringInfo object.
Create a new StringInfo for the string passed
The target of the new StringInfo object.
Creates a new StringInfo for the string passed
The target of the new StringInfo object
A new StringInfo object
Information describing the character.
Tests each character in the current target against a function
The function.
true if it succeeds, false if it fails.
Test whether a character is alphabetic
Test whether a character is an operator
The is alpha ISO 10646.
Returns the target of this StringInfo object
A string
The string which is being tested
The value is alphabetic.
The value is numeric.
The value is numeric, or characters that can be parts of numbers (+,-,.)
The value is all lowercase.
Gets a value indicating whether the cvale upper.
The value is whitespace.
The value is alphanumeric.
The value is a math operator.
The string contains alpha characters.
The string is a valid HTML attribute name.
Indicates that a character is alphabetic-like character defined as a-z, A-Z, hyphen,
underscore, and ISO 10646 code U+00A1 and higher. (per characters allowed in CSS identifiers)
Gets a value indicating whether the target is non-null and non-empty.
String scanner engine. A lexical scanner to match complex patterns.
Interface defining a StringScanner - a lexical scanner
Returns the character after the current character
A character
Causes the next action to permit quoting -- if the first character is a quote character, stop
characters between there and the next matching quote character will be ignored.
true if the next value is quoted, false if not
If the pointer is current on whitespace, advance to the next non-whitespace character. If the
pointer is not on whitespace, do nothing.
Advance the pointer to the next character that is not whitespace. This differes from
SkipShitespace in that this always advances the pointer.
Advance the pointer by one character.
true if the pointer can be advanced again, false if it is after the last position.
Move the pointer back one position.
true if the pointer can be moved back again, false if it is at the origin.
Moves the pointer by a specific number of characters, forward or reverse.
A positive or negative integer.
true if the pointer is not at the origin or after the end of the string, false otherwise.
Undo the last operation
Moves the pointer past the last character postion.
Throw an error if the current scanner is not finished.
(optional) message describing the error.
Throw an error if the current scanner is finished.
(optional) message describing the error.
Resets the pointer to the origin and clear any state information about the scanner. This sets
the internal state as if it had just been created.
Test that the text starting at the current position matches the passed text.
The text to match
true if it succeeds, false if it fails.
Test that the text starting at the current position is any of the strings passed.
A sequence of strings to match
true if one of, false if not.
Seeks until a specific character is found. The Match string becomes everything from the
current position, through the position before the matched character. If the scanner is
already at the end, an exception is thrown.
The character to seek.
When true, the end of the string is a valid match. When false, the end of the string will
cause an exception.
The current string scanner.
Creates a new scanner from the current match.
A new IStringScanner
Creates a new scanner from the current match.
The template.
A new IStringScanner.
Assert that the text matches the string starting at the current position. The pointer is
advanced to the first position beyond the matching text. If it does not, an ArgumentException
is thrown.
The text to match.
The current StringScanner.
Assert that the text matches the pattern defined by an IExpectPattern object. The pointer is
advanced until the pattern stops matching. If it does not, an ArgumentException is thrown.
A pattern specifying the.
The current StringScanner.
Assert that at least one character starting at the current position validates using a
function delegate. The pointer advances until the delegate returns false. If it does not, an
ArgumentException is thrown.
The validate.
The current StringScanner.
Assert that the current character matches the character passed. The pointer is advanced by
one position. If it does not, an ArgumentException is thrown.
The character to seek.
.
Assert that the current character matches any of the characters passed. The pointer is
advanced by one position. If it does not, an ArgumentException is thrown.
The characters to match
The current string scanner.
Assert that there is a pattern that matches a number starting at the current position. The
pointer is advanced to the position after the end of the number. If it does not, an
ArgumentException is thrown.
(optional) Indicates if whitespace is the only valid terminator. If true, an
ArgumentException will be thrown if the first character that terminates the number is not
whitespace. If false, any character that is invalid as part of a number will stop matching
with no error.
The current string scanner.
Assert that the current pattern is alphabetic until the next whitespace.
The current string scanner.
Asser that the current pattern is bounded by the start and end characters passed
The start bound character
The end bound character
(optional) True if the contents of the bounds can be quoted
The current string scanner
Gets or sets the text that the scanner acts upon
Gets or sets the text that this scanner acts upon.
Gets or sets a value indicating whether the scanner should ignore whitespace. When true, it
is skipped automatically.
Gets the length of the text bound to this scanner.
Gets or sets the current zero-based position of the scanner.
Gets the zero-based index of the scanner before the last operation.
Gets the current character.
Gets the next character, or an empty string if the pointer is at the end of the string.
Gets the current match string (usually, the text between the prior pointer position and the
current pointer position, possibly excluding whitespace. This depends on the last operation).
Gets the match prior to the curren one.
Gets a value indicating whether the pointer is after the end of the string.
Gets a value indicating whether at the last character of the string.
Gets a value indicating whether the last operation succeeded. Since failure throws an error,
this is generally useful only if errors are trapped.
Gets the error message when the prior operation failed.
CharacterInfo object bound to the character at the current index.
Create a new StringScannerEngine with no configuration
Create a new StringScannerEngine for a string
The string to scan
Create a new StringScannerEngine for a string
The string to scan.
Common configuration tasks for all constructors.
Causes the next action to permit quoting -- if the first character is a quote character, stop characters between there
and the next matching quote character will be ignored.
Creates a new stringscanner instance from the current match
Creates a new StringScanner instance from a string that is formatted using the current match
as the single format argument.
Thrown when the prior operation failed.
The string to use as a template
A new StringScanner
Test that the text starting at the current position matches the passed text.
The text to match
true if it succeeds, false if it fails.
Test that the text starting at the current position is any of the strings passed.
A sequence of strings to match
true if one of, false if not.
Seeks until a specific character is found. The Match string becomes everything from the
current position, through the position before the matched character. If the scanner is
already at the end, an exception is thrown.
The character to seek.
When true, the end of the string is a valid match. When false, the end of the string will
cause an exception.
The current string scanner.
If the current character is whitespace, advances to the next non whitespace. Otherwise, nothing happens.
Advances to the next non-whitespace character
Moves pointer forward one character, or to the position after the next match.
Returns to the state before the last Expect. This is not affected by manual Next/Prev operations
Moves the pointer past the last character postion.
If current character (or next non-whitespace character) is not the expected value, then an error is thrown
If one of the current characters (or next non-whitespace character) is not the expected value, then an error is thrown
Starting with the current character, treats text as a number, seeking until the next
character that would terminate a valid number.
(optional) the require whitespace terminator.
.
Starting with the current character, seeks until a non-alpha character is found
Continue seeking as long as the delegate returns true.
A class specifying the pattern to match.
The string scanner.
Continue seeking as long as the delegate returns True.
A pattern matching function
This IStringScanner instance
Expects a string bounded by the character at the current postion. If the current character is
a bounding character, then the pattern will match until the matching closing bound character
is found, e.g. () [] {} <>. For non-bounding characters, the pattern will match until
the same character is found again.
The position to start scanning.
The last position.
(optional) the allow quoting.
The bounded by.
The single character bound will be matched with a closing char for () [] {} <> or the
same char for anything else.
.
(optional) the allow quoting.
The bounded by.
Require that the text starting at the current position matches a pattern which is bounded by
a specific character, with the inner value opotionally quoted with a quote character ' or ".
The bounding character.
(optional) the allow quoting.
The current string scanner.
Cache the last pos before an attempted operation,.
Thrown when there is already something cached.
Sets the current position, updates the last pos from cache, and clears any current match. If the cached position is the same
as the current position, nothing is done.
Restores position from cache
When true, the next seek should honor quotes
Gets or sets the text that the scanner acts upon.
Gets or sets the length of the text bound to this scanner.
Gets or sets the current zero-based position of the scanner.
Return the character at the current scanning position without advancing the pointer. Throw an error
if the pointer is at the end of the string.
Return the character at the current scanning position without advancing the pointer. If the pointer is
at the end of the string, return an empty string.
The string or character that has been matched.
The string or character matched prior to last operation
The current position is after the last character
The current position is on the last character
The character at the current position is alphabetic
Match functions. These are used with StringScanner to parse out expected strings. A basic
match function accepts an int and a char, and is eand returns true as long as the character
is valid for that position in the string. Many patterns have different valid first characters
versus later characters. The function will be called beginning with index zero, and continue
to be called until it returns false, indicating that the end of a pattern that matches that
concept has been reached.
More complex patterns require a memory of the previous state, for example, to know whether
quoting is in effect. the IExpectPattern interface describes a class to match more complex
patterns.
Return true while the string is alphabetic, e.g. contains only letters.
Zero-based index of the current position in the string.
The character at the current position.
True if the current character is valid for this pattern, false if not.
Returns a pattern that matches numbers.
(optional) when true, only whitespace can terminate this number. When false, any non-numeric character will succesfully terminate the pattern.
The total number of ber.
Gets an expect pattern for a string that's an HTML attribte name
An expect pattern
Gets an expect pattern for a string that's a valid HTML tag selector.
An expect pattern
Gets an expect pattern for a string that's bounded by the provided values.
(optional) the bound start.
(optional) the bound end.
(optional) the honor inner quotes.
An expect pattern
Test whether the character is whitespace.
Zero-based index of the current position in the string. Not used for this test.
The character at the current position.
true if it is whitespace, false if it fails.
Test whether the character is a quote character.
Zero-based index of the current position in the string.
The character at the current position.
true if it succeeds, false if it fails.
Test whether the character is a bound character.
Zero-based index of the current position in the string.
The character at the current position.
true if it succeeds, false if it fails.
Gets an expect patter for a quoted string.
An expect pattern
A matching function that validates
Zero-based index of the.
The character.
true if it succeeds, false if it fails.
Returns a pattern matching a string that is optionally quoted. If terminators are passed, any
character in that string will terminate seeking.
(optional) the terminators.
An expect pattern
Test whether the character is an operator.
Zero-based index of this character's position. Not used for this test.
The character.
true if it is an operator, false if it fails.
Gets an expect pattern for a string that's bounded by known bounding characters, and has
quoted content.
Matches a valid CSS class: http://www.w3.org/TR/CSS21/syndata.html#characters Does not
currently deal with escaping though.
The name of the CSS class.
Matches anything that is bounded by accepted bounding characters
ID can contain any character other than a space; however, a selector is bounded by other terminators.
Match a string pattern against a particular character validation function, but allow the backslash to escape
any character.
Default constructor -- simply parses escapes until the end of the string
Default constructor.
Match a pattern for a valid HTML ID.
The index to match
The character to match
true if valid identifier, false if not.
A pattern that matches a valid HTML tag selector.
Default constructor.
Match a pattern for am attribute name selector
A pattern that matches a valid HTML attribute name.
Default constructor.
Match a pattern for an attribute name selector
A pattern that matches a valid CSS class name
Default constructor.
Match a pattern for a CSS class name selector
TODO - doesn't validate hyphen-digit combo.
A pattern that matches a number
Initializes the pattern. This is called before any scanning begins.
The index within the source string to begin scanning.
The source string.
Run the validation against the passed string.
Returns true if the pattern defined by this class is successfully matched, and false if not.
Internal flag that validation has failed
Internal flag indicating that a decimal point has appeared already and another would indicate
failure or termination.
Assert that the character at the current position matches the pattern
[in,out] Zero-based index of the position
The current character
true if it succeeds, false if it fails.
Normally true, indicates that only legal whitespace can successfully terminate the number;
other non-numeric characters will cause failure. If false, any non-numeric character will
terminate successfuly.
Match an attribute value that is optionally quoted with a quote character ' or ".
A pattern that expects a quoted string. Allows any characters inside the quoted text,
including backslashed escape characters, and terminates upon a matching closing quote.
The quote character that was used to open the string.
Run the validation against the passed string.
Returns true if the pattern defined by this class is successfully matched, and false if not.
Finishes a validation
true if the string matched the pattern defined by this instance, false if not.
Assert that the current character matches the pattern defined by this object.
Zero-based index of the current position.
The current character.
true if the pattern matches at this position, false if not.
Create in instance of the pattern matcher using default terminators
Create in instance of the pattern matcher using any character in the string as a terminator.
A closing quote (when the string is quoted) is always a terminator.
A string containing characters, each of which will terminate seeking (when not inside a quote
block)
Initializes this object from a character array.
The start index.
Source text.
Run the validation against the passed string.
Returns true if the pattern defined by this class is successfully matched, and false if not.
Finishes a validation.
true if the string matched the pattern defined by this instance, false if not.
Override the default Expect for a quoted string to also terminate upon finding one of the
terminators (if not quoted).
The current index.
The current character.
true to continue seeking.
When unquoted, this will terminate the string.
Factory for StringScanner objects
Creates a new StringScanner from a string.
The text.
A new StringScsanner.
Helper methods to perform matching against attribute-type selectors
Test whether a single element matches a specific attribute selector.
The element to test.
The selector.
true if the element matches, false if not.
Test whether a sentence contains a word.
The sentence.
The word.
The comparer.
true if it contains the word, false if not.
Factory class for PseudoSelectors: provides an API for managing selectors.
Default constructor/.
Throws an exception if an instance has already been assigned to the static Items property.
This class should instantiate itself as a singleton.
Gets an instance of a named pseudoselector
Thrown when the pseudoselector does not exist
The name of the pseudoselector
A new instance
Gets a registered pseudoclass filter type. If the name is not registered, an exception is
thrown.
The name of the pseudoselector.
The registered type.
Try to get the type of a registered pseudoclass filter.
The name of the pseudoselector.
The type.
true if it the named filter was found, false if not.
Try to gets an instance of a named pseudoclass filter.
The name of the pseudoselector.
[out] The new instance.
true if succesful, false if a pseudoselector of that name doesn't exist.
Registers a new PseudoSelector type by name.
The name of the pseudoselector.
The type.
Throws an exception when the type does not inherit IPseudoSelector.
Registers all classes implementing IPseudoSelector in the namespace CsQuery.Extensions in the
passed assembly. If no assembly is provided, then inspects the calling assembly instead.
This method is called when the LookForExtensions startup option is set. (This is the default
setting).
The assembly to search.
The number of extensions added
Unregisters the names pseudoclass filter.
The name of the pseudoselector.
Static instance of the PseudoSelectors singleton.
Bitfield of flags for specifying the SelectorType.
Return all elements.
Return only a specific tag/node name.
Return a specific ID.
Return elements containing a specific class.
Return elements matching an attribute type selector
Return elements matching a pseudoclass filter selector.
Return specific elements
Generate HTML.
Return nothing.
Values that represent the type of attribute selector
The attribute exists.
The attribute's value matches a specific value.
The attribute's value starts with a specific value.
The attribute's value contains a specified substring.
The attribute does not exist.
The attribute contains a complete word (e.g. a subtring bounded by whitespace).
The attribute ends with a specified substring.
The attribute does not equal a string.
The attribute value, or the part of the value before a hyphen (if present), matches a value
Values that represent CombinatorType. This is a bit of a misnomer because Combinator is used
in CSS selector-speak to refer to how one subpart of a selector relates to another.
Unfortunately, I use it to refer to how one *group* of a selector relates to another. This is
an internal concept, mostly, and is required to link subparts of a selector together.
The results of this selector clause are grouped with the results of the prior, e.g. an "or" condition
The selector clause is applied to the results of the prior one.
The selector clause is applied to the root of this selector.
The selector clause is applied to context.
Values that represent TraversalType. This is essentially what CSS calls "combinator" and
defines the traversal mechanism used from one selector subpart to the next.
Traverse the context itself and its descendants
The operand matches a subset of the prior selection.
The operand matches only descendants of the prior selection.
The operand matches only direct children of the prior selection.
The operand matches only the element immediately following (adjacent to) the prior selection.
The operand matches all siblings of the prior selection.
Position-type selectors match one or more element children of another element. The selection engine can either access all
matching children, or test a particular element for matching a selector
Matches everything (no filter)
Filter for elements at even-numbered ordinal indices.
Filter for elements at odd-numbered ordinal indices.
Filter for only the first element in the selection.
Filter for only the last element in the selection.
Filter for a specific ordinal index in the sequence.
Filter for elements appearing before a specific ordinal index.
Filter for elements appearing after a specific ordinal index.
Filter for elements that are parents.
Filter for elements that are visible.
Filter for elements that are not visible (including type=hidden).
Filter for header (H1-H6) tags.
Filter for elements that contain elements matching another selector.
Filter for elements that don't contain elements matching another selector.
Elements that are first children.
Elements that are last children.
Elements that are nth children.
Elements that are the first child of their node type.
Elements that are the last child of their node type.
Elements that are the nth child of their node type.
Elements that are the nth to last child.
Elements that are the nth to last child of their node type
Elements that are only children.
Elements that are the only children of their type.
Elements that have no element or non-whitespace children.
A class to parse a CSS selector string into a sequence of Selector objects
Parse the string, and return a sequence of Selector objects
Adds a named pseudo selector from the pseudoselector library.
The pseudoselector name
true if it succeeds, false if it fails.
A pattern for the operand of an attribute selector
Start a new chained filter selector of the specified type.
The selector type to start.
Start a new selector that does not yet have a type specified
Start a new chained selector that does not yet have a type specified
Close the currently active selector. If it's partial (e.g. a descendant/child marker) then merge its into into the
new selector created.
Finishes any open selector and clears the current selector
Clear the currently open selector
Return true of the text appears to be HTML (e.g. starts with a caret)
The currently active selector clause in the selector construction process. If none is active,
a new one is started.
Extension methods for use in form manipulation
Get the value for a particular form element identified by "#ID" or "name". This method will
create a selector that identifies any input, select, button or textarea element by name
attribute (if not passed an ID selector)
The CsQuery object to which this applies.
The name of the input element.
A string that represents the form field value.
Get the value for a particular form element identified by "#ID" or "name".
The type to cast the value to
The context in which to find the element
The name of the form element
A value of type T
Return an element identified by "#id" or "name". (Special case selector to simplify accessing
form elements).
Thrown if the name was invalid
The context in which to find the element
The name of the form element
A CQ object with the form element.
(BETA) Update form values from the HTTP post data in the current HttpContext.
The context in which to find process form elements
The context
(Beta) Update form values from the data in collection provided.
The selections set to update form values within; only child elements of elements in the
selection set will be processed.
Information describing the post.
A CQ object with all form elements searched.
(Alpha) Update form values from the data in httpContext.Request.Form.
The selections set to update form values within; only child elements of elements in the
selection set will be processed.
The HttpContext from which to obtain post data
A CQ object with all form elements searched.
Restore "value" to a single element.
Thrown when the requested operation is invalid.
The element to restore a value to
The context to which this element belongs
The value to restore
Build a dropdown list for each element in the selection set using name/value pairs from data.
Note tha the "key" becomes the "value" on the element, and the "value" becomes the text
assocaited with it.
The target on which to create the dropdown list
The data source for the dropdown list
If non-null, the text for any zero value will be this instead of the enum's description.
The current CQ object
Create a list from an enum's values & descriptions.
Thrown when one or more arguments have unsupported or illegal values.
Generic type parameter.
The select element on which to create the list
If non-null, the text for any zero value will be this instead of the enum's description.
When true, will attempt to format camelcased values.
The new drop down from enum< t>
Adds or removes the "enabled" property based on the parameter value
Replacement for Activator.CreateInstance that caches the constructor fucnction, providing a
significant performance improvement over Activator.CreateInstance. Calling with a value type
will be deferred to Activator.CreateInstance.
http://mironabramson.com/blog/post/2008/08/Fast-version-of-the-ActivatorCreateInstance-method-using-IL.aspx
Create a new instance of type T
The type of object to create
A new instance of type T
Creates an instance.
The Type to process.
The new instance.
A set of helper methods for analyzing types.
Determine if the type is an anonymous type.
A type/
true if anonymous type, false if not.
http://stackoverflow.com/questions/2483023/how-to-test-if-a-type-is-anonymous.
Values that represent the current CsqWebRequest state.
NOT YET IMPLEMENTED
The request is idle.
The request is in progress.
The request failed.
The request .
The request finished successfully.
Data about a web request.
The time, in milliseconds, after which to abort an incompete request.
The UserAgent string to present to the remote server.
Utility class for integrating CsQuery with ASP.NET Webforms.
Creates a new CsQueryHttpContext object bound to an ASP.NET WebForms page.
The current System.Web.UI.Page.
The delegate to the base render method.
The HtmlTextWriter to output the final stream (the parameter passed to the Render method)
A context which can be used to complete the Render after any manipulation with CsQuery.
Creates a new CSQuery object from a Page.Render method. The base Render method of a page
should be overridden, and this called from inside it to configure the CsQUery.
The current System.Web.UI.Page.
The delegate to the base render method.
The HtmlTextWriter to output the final stream (the parameter passed to the Render method)
The context.
A context which can be used to complete the Render after any manipulation with CsQuery.
A formatter that converts a DOM to a basic plain-text version.
Renders this object to the passed TextWriter.
The node.
The writer.
Renders this object and returns the output as a string.
The node.
A string of HTML.
Adds the contents to 'node' to the StringBuilder.
The StringBuilder.
The node.
true to skip any leading whitespace for this node.
Converts the newline characters in a string to standard system line endings
The text.
The converted string
Removes trailing whitespace in this StringBuilder
The StringBuilder.
Clean a string fragment for output as text
The text.
The clean text
A promise that resolves when one or more other promises have all resolved
Constructor
A variable-length parameters list containing promises that must all resolve
Constructor to create a promise that resolves when one or more other promises have all
resolved or a timeout elapses.
The timeout in milliseconds.
A variable-length parameters list containing promises that must all resolve.
When false, means one or more of the promises was rejected, and the All will be rejected.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will be chained to this promise.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will be chained to this promise.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Called when a client promise is resolved.
Called when a client promise is rejected.
A static provider for methods that produce Promise-related objects
Returns a new Deferred object, an object containing a promise and resolver methods.
A new Deferred object.
Returns a new Deferred object, an object containing a promise and resolver methods.
Generic type parameter determining the type of parameter that will be passed to the resolvers
A new Deferred object
Returns a new promise that resolves when all of the promises passed by parameter have resolved
One or more IPromise objects
A new IPromise object
Returns a new promise that resolves when all of the promises passed by parameter have
resolved, or when the time has elapsed
The timeout in milliseconds.
One or more IPromise objects.
A new IPromise object.
Return a promise that fails after the specified time. This is like Timer, but fails rather
than succeeds after the time has elapsed.
The timeout in milliseconds.
A promise.
Return a promise that resolves successfully after the specified time.
The timeout in milliseconds.
A promise.
Gets or sets a value indicating whether objects in the Promises library should be created in
debug mode. This affects Deferred.FailOnResolutionExceptions.
A strongly-typed deferred object
Generic type parameter.
A Deferred object. Deferred objects implement the IPromise interface, and have methods for
resolving or rejecting the promise.
Default constuctor for a Deferred object.
The thread locker object
The next deferred objected in the chain; resolved or rejected when any bound delegate is
resolved or rejected./.
Indicates whether this object has been resolved yet. A null value means unresolved; true or
false indicate success or failure.
The parameter that was passed with a resolution or rejection.
Resolves the promise.
(optional) a value passed to the promise delegate
Rejects the promise
(optional) a value passed to the promise delegate.
Chains a delegate to be invoked upon resolution or failure of the Deferred promise object.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will resolve when this promise has resolved.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will be chained to this promise.
Chains delegates that will be executed on success or failure of a promise.
The delegate to call upon successful resolution of the promise.
(optional) The delegate to call upon unsuccessful resolution of the promise.
A new promise which will be chained to this promise.
Gets the parameters that should be invoked on the success/fail delegate.
When true, the target delegate has parameters and this should return a non-null result.
The parameters.
Implementation of the Resolve function.
Implementation of the Reject function
The success delegate
The failure delegate
When false (default), errors thrown during promise resoluton will be turned into a rejected
promise. If this is true, no error handling will occur, meaning that errors could bubble, or
in the event that a promise was resolved by an asynchronous event, be unhandled. Typically,
you would only want this to be false when debugging, as it could result in unhandled
exceptions.
Bind delegates to the success or failure of a promise
The success delegate
(optional) the failure delegate
A new promise that resolves when the current promise resolves.
Bind delegates to the success or failure of a promise
The success delegate
(optional) the failure delegate
A new promise that resolves when the current promise resolves.
An action accepting a single parameter that runs on a promise resolution.
The type of the parameter
The parameter.
An action accepting a single parameter that runs on a promise resolution, and returns another
promise.
The type of the parameter
The parameter.
A new promise that can be chained.
Provides information about the web browser used to access the current page (from HttpContext)
Create a new instance from an HttpContext
The context.
When true, indicates that the browser is Microsoft Internet Explorer of any version.
When true, indicates that the browser is Google Chrome of any version.
Gets the complete version number of the browser
Gets the major version number of the browsers.
Interface fora JSON serializer.
Serializes an object to JSON
The object to serialize
A JSON string
Deserializes a string of JSON to a CLR object
The JSON.
The type of object to create
An object
Deserializes a string of JSON to a strongly-typed object
The type of object
The JSON.
A new object of type T
TODO: This class needs some help. While not thrilled about the idea of writing another JSON
serializer, CsQuery does some unique handling for serialization & deserialization, e.g.
mapping sub-objects to expando objects.
We can do a post-op parsing from any other JSON serializer (such as we are doing now) but
this doubles the overhead required. Look at a customized implementation from Newtonsoft,
though any customization makes it difficult to use a simple strategy for drop-in replacement
of the serializer. Perhaps implement an interface for a serializer wrapper class that lets us
pass any generic serializer that performs needed post-op substitutions as part of the base
library, with an optimized native implementation?
The real serializer implementation. We need to set up a DI contiainer to manage this (see todo above)
Serializes an object to JSON
The object to serialize
A JSON string
Deserializes a JSON string to an object of the specified type
The JSON string
The type of object to create
A new object of the specified type
Deserializes a JSON string to an object of type T.
Generic type parameter defining the type of object to return.
The value.
A new object of type T.
Test if value implements IDictionary<,>
The value.
true if a dictionary, false if not.
A comparer to ensure that items are returned from a selection set in DOM order, e.g. by comparing their
internal paths.
Constructor.
Thrown when the requested operation is invalid.
The order used to compare two items. This must be Ascending or Descending
Compares two IDomObject objects to determine their relative ordering.
I dom object to be compared.
I dom object to be compared.
Negative if 'x' is less than 'y', 0 if they are equal, or positive if it is greater.
A controller for creating and managing asynchronous web requests
Start an async request, and return a unique ID that identifies it.
The URL of the remote server.
A delegate to invoke upon successful completion of the request.
A delegate to invoke when a request fails.
Options to be used when creating this request. If not provided, the default options will be
used.
A unique identifier that can be used to track this request when it resolves.
Start an async request from an ICsqWebRequest object
The URL of the remote server.
A delegate to invoke upon successful completion of the request.
A delegate to invoke when a request fails.
Start an async request identified by a user-supplied ID.
The URL of the remote server.
A delegate to invoke upon successful completion of the request.
A delegate to invoke when a request fails.
The identifier.
Options to be used when creating this request. If not provided, the default options will be
used.
Waits until all async events have completed. Use for testing primarily as a web app should
not stop normally.
The maximum number of milliseconds to wait.
true if all events were cleared in the allotted time, false if not.
Cancel all outstanding async events.
Gets the asynchronous request identifier.
The asynchronous request identifier.
Interface for a CsQuery async web response.
Interface representing a CsQuery web request.
The url to load.
The CQ object representing the contents of the URL.
Returns true when this request has finished processing.
An ID that uniquely identifies this request; will be returned with the response for
asynchronous requests.
Gets or sets options for controlling the operation.
The HTML returned by the response
Gets the time the request began
Gets the time the request finished.
Gets a value indicating whether the request completed successfully.
The HTTP status code for the response.
The HTTP status description for the response.
Text of any error that occurred
If the request resulted in an exception, the exception.
Gets the response character set encoding identified by the response header
A sorted dictionary that allows lookup by range.
Return all keys starting with subKey
The substring to match
Return all values having keys beginning with subKey
A CSS selector parsed into it's component parts
Default constructor.
Initializes this object to its default state
Clears this object to its blank/initial state.
Makes a deep copy of this Selector.
A copy of this object.
Serves as a hash function for a particular type.
A hash code for the current .
Determines whether the specified is equal to the current
.
The to compare with the current .
true if the specified is equal to the current
; otherwise, false.
Gets a hash.
The to compare with the current .
The hash.
Returns a string representation of the parsed selector. This may not exactly match the input
selector as it is regenerated.
A CSS selector string.
The type of the selector clause.
The CombinatorType for this selector clause; this determines what set of elements it is applied to.
The TraversalType for this clause; this determines the depth of children to test for certain selector types.
The AttributeSelectorType determines how values are matched for attribute selectors.
When this is a pseudoselector, the implementation.
The pseudo selector.
Selection tag name
This is really "parameters" and is used differently by different selectors. It's the criteria for attribute selectors;
the node type for -of-type selectors, the equation for nth-child. For nth-of-type, its "type|equation"
Gets or sets zero-based index of the position.
For Position selectors, the position. Negative numbers start from the end.
For Child selectors, the depth of the child.
For attribute selectors, gets or sets the name of the attribute to match
For AttributeValue selectors, the value to match
Gets or sets the identifier of the attribute name token.
Returns a string comparer based on the case-sensitivity characteristics of the attribute being tested
Returns a string comparer based on the case-sensitivity characteristics of the attribute being tested
For Class selectors, the class name to match
For ID selectors, the ID to match
The HTML to create, for HTML "selectors"
The list of elements that should be matched, for elements selectors.
Gets a value indicating whether this object is a selector that is based on the element's
position in the DOM, versus the element's position in the result set.
Indicates that a position type selector refers to the result list, not the DOM position.
Gets a value indicating whether this selector accepts parameters.
Gets a value indicating whether this Selector is new (unconfigured).
Gets a value indicating whether this object is completely configured.
When true do not attempt to use the index to obtain a result from this selector. Used for
automatically generated filters.
Values that represent data types of CSS Styles.
A unit
An option
A unit and an option.
A complex style definition.
A named color
A font name.
A url.
A string of text.
Values that represent the HTML document type.
Use the default doc type (from CsQuery.Config.DocType).
HTML5
HTML 4 Transitional
XHTML -- all tags will be explicitly closed.
An unsupported document type.
HTML 4 Strict
Flags specifying how the document should be rendered
No option flags. This is not the same as "default", but rather explicitly uses "false" values for all flags.
Render with default options as determined by CsQuery.Config.DomRenderingOptions
This option only appies to the old HTML parser. It is obsolete, has no effect, and will be
removed in a future version of CsQuery.
Remove comments from the output
Add quotes around each attribute value, whether or not they are needed. The alternative is to only
use quotes when they are necesssary to delimit the value (e.g. because it includes spaces or other quote characters)
Values that represent NodeType.
An element node.
A text node.
A CDATA node.
A comment node.
A document node.
The DOCTYPE node.
A document fragment node.
A single CSS style definition.
The name of the style
The type of data contained by this style.
Gets or sets a format required by this style
The acceptable options for Option-type styles
A description of this style.
Interface defining the style declaration for a DOM element.
Test whether a named style is defined on an element.
The name of the style.
true if the style is explicitly defined on this element, false if not.
Sets one or more styles on the element.
The semicolon-separated style definitions.
Sets one or more styles on the element.
The semicolon-separated style definitions.
When true, the styles will be validated for correct sytax, and an error thrown if they fail.
Sets a style identified by name to a value.
The name.
The value.
Sets a style identified by name to a value.
The name.
The value.
When true, the styles will be validated for correct sytax, and an error thrown if they fail.
Gets a named style.
The name.
The style.
Removes the style from the style descriptor for this element.
The name.
true if it succeeds, false if it fails. this can only fail if the style was not present.
The number of properties that have been explicitly set in this declaration block.
The parsable textual representation of the declaration block (excluding the surrounding curly
braces). Setting this attribute will result in the parsing of the new value and resetting of
all the properties in the declaration block including the removal or addition of properties.
The CSS rule that contains this declaration block or null if this CSSStyleDeclaration is not
attached to a CSSRule.
Event raised when the HasStyles attribute changes
A marker interface for CDATA elements.
Interface for an IDomSpecialElement; and element whose data is contained as non-structured
data in the tag itself.
Gets or sets the non-structured data in the tag
An interface for HTML Comment elements.
Gets or sets a value indicating whether this object is quoted.
An interface to a DOM Document, the high-level representation of an HTML document. This is
analagous to the web browser "document" object.
Returns a reference to the element by its ID.
The identifier.
The element by identifier.
https://developer.mozilla.org/en/DOM/document.getElementById
Gets an element by identifier, and return a strongly-typed interface
Generic type parameter.
The identifier.
The element by id< t>
Creates the specified HTML element.
Name of the node.
The new element.
https://developer.mozilla.org/en/DOM/document.createElement
Creates a new Text node.
The text.
The new text node.
https://developer.mozilla.org/en/DOM/document.createTextNode
Creates a new comment.
The comment.
The new comment.
https://developer.mozilla.org/en/DOM/document.createComment
Creates a document type node.
The type.
The public type identifier.
The system type identifier.
The new document type.
Returns the first element within the document (using depth-first pre-order traversal of the
document's nodes) that matches the specified group of selectors.
The selector.
An element, the first that matches the selector.
https://developer.mozilla.org/En/DOM/Document.querySelector
Returns a list of the elements within the document (using depth-first pre-order traversal of
the document's nodes) that match the specified group of selectors.
The selector.
A sequence of elements matching the selector.
https://developer.mozilla.org/en/DOM/Document.querySelectorAll
Returns a list of elements with the given tag name. The subtree underneath the specified
element is searched, excluding the element itself.
Unlike the browser DOM version, this list is not live; it will represent the selection at the
time the query was run.
Name of the tag.
The element by tag name.
https://developer.mozilla.org/en/DOM/element.getElementsByTagName
Creates an IDomDocument that is derived from this one. The new type can also be a derived
type, such as IDomFragment. The new object will inherit DomRenderingOptions from this one.
The type of object to create that is IDomDocument
A new, empty concrete class that is represented by the interface T, configured with the same
options as the current object.
Creates an IDomDocument that is derived from this one. The new type can also be a derived
type, such as IDomFragment. The new object will inherit DomRenderingOptions from this one.
The new Document.
An interface to the internal indexing methods. You generally should not use this.
Gets the document type node for this document, or null if none exists.
Returns the document type of this document. If no DOCTYPE node exists, this will return the default
document type defined through the CsQuery.Options variable.
Gets the style sheets for this document. (This feature is not implemented completely).
Return the body element for this Document.
DOCTYPE node
Gets the type of the document.
Interface for a fragment. This is content that does not represent a complete HTML document.
Special element for the text contents of SCRIPT & TEXTAREA objects.
Defines an interface for elements whose defintion (not innerhtml) contain non-tag or attribute formed data
An element that will be rendered as text because it was determined to be a mismatched tag
A single CSS style definition.
The name of the style.
The type of data contained by this style.
Gets or sets a format required by this style.
A description of this style.
The acceptable options for Option-type styles.
An incomplete document fragment
Special node type to represent the DOM.
Creates a new, empty DomDocument
A new DomDocument
Creates a new DomDocument (or derived object) using the options specified.
The elements that are the source for the new document.
(optional) the parsing mode.
The DocType for this document.
A new IDomDocument object
Creates a new DomDocument (or derived) object
The HTML source for the document
(optional) the parsing mode.
(optional) options for controlling the parsing.
The DocType for this document.
A new IDomDocument object
Creates a new DomDocument (or derived) object.
The HTML source for the document.
(optional) the character set encoding.
(optional) the HTML parsing mode.
(optional) options for controlling the parsing.
The DocType for this document.
A new IDomDocument object.
Create a new, empty DOM document
Populates this instance with the sequence of elements
The elements that are the source for the new document.
Clears this object to its blank/initial state.
Add an element to the index using the default keys for this element
Add an element to the index using a specified index key
Remove an element from the index
Remove an element from the index using its key
Query the document's index for a subkey up to a specific depth, optionally including descendants that match the selector
The zero-based depth to which searches should be limited
Query the document's index for a subkey
Returns a reference to the element by its ID.
The identifier.
The element by identifier.
https://developer.mozilla.org/en/DOM/document.getElementById
Gets an element by identifier, and return a strongly-typed interface.
Generic type parameter.
The identifier.
The element by id< t>
Gets element by tag name.
Name of the tag.
The element by tag name.
Returns a list of elements with the given tag name. The subtree underneath the specified
element is searched, excluding the element itself.
Name of the tag.
The element by tag name.
https://developer.mozilla.org/en/DOM/element.getElementsByTagName
Returns the first element within the document (using depth-first pre-order traversal of the
document's nodes) that matches the specified group of selectors.
The selector.
An element, the first that matches the selector.
https://developer.mozilla.org/En/DOM/Document.querySelector
Returns a list of the elements within the document (using depth-first pre-order traversal of
the document's nodes) that match the specified group of selectors.
The selector.
A sequence of elements matching the selector.
https://developer.mozilla.org/en/DOM/Document.querySelectorAll
Creates a new Element node.
Name of the node.
The new element.
https://developer.mozilla.org/en/DOM/document.createElement
Creates a new Text node.
The text.
The new text node.
https://developer.mozilla.org/en/DOM/document.createTextNode
Creates a new comment node.
The comment.
The new comment.
https://developer.mozilla.org/en/DOM/document.createComment
Creates the document type node.
The type.
Public identifier
System identifier
The new document type.
Creates the document type node.
The DocType for this document.
The new document type.
Makes a deep copy of this object.
A copy of this object.
Clones the child elements of this document
A sequence of cloned elements
Convert this object into a string representation; provides summary information about the
document.
This object as a string.
Return a sequence of elements that excludes non-Element (e.g. Text) nodes
The input sequence
A sequence of elements
Creates an IDomDocument that is derived from this one. The new type can also be a derived
type, such as IDomFragment. The new object will inherit DomRenderingOptions from this one.
The type of object to create that is IDomDocument.
A new, empty concrete class that is represented by the interface T, configured with the same
options as the current object.
Creates an IDomDocument that is derived from this one. The new type can also be a derived
type, such as IDomFragment. The new object will inherit DomRenderingOptions from this one.
A new, empty concrete class that is represented by the interface T, configured with the same
options as the current object.
Creates an IDomDocument that is derived from this one. The new type can also be a derived
type, such as IDomFragment. The new object will inherit DomRenderingOptions from this one.
Thrown when one or more arguments have unsupported or illegal values.
The type of object to create that is IDomDocument.
The elements that are the source for the new document.
A new, empty concrete class that is represented by the interface T, configured with the same
options as the current object.
Gets the style sheets for this document. (This feature is not implemented completely).
Exposes the Document as an IDomIndex object
The index
The direct parent of this node.
The full path to this node. For Document nodes, this is always empty.
Gets the unique path to this element as a string. THIS METHOD IS OBSOLETE. It has been
replaced by NodePath.
The depth in the node tree at which this node occurs. This is always 0 for the DomDocument.
Deprecated: DomRenderingOptions are no longer bound to a particular Document instance. Pass
options to the Render() method, or create an IOutputFormatter instance using options, instead.
This method will be removed in a future release.
The DOM for this object. For Document objects, this returns the same object.
Gets the type of the node. For Document objects, this is always NodeType.DOCUMENT_NODE
Gets the DOCUMENT_TYPE node for this document, or null if none exists.
Gets the DocType for this document.
Gets a value indicating whether HTML is allowed as a child of this element. For Document
nodes, this is always true.
Any user data to be persisted with this DOM.
Return the body element for this Document.
Gets a value indicating whether this object type should be indexed.
The element is not associated with an IDomDocument.
Gets a value indicating whether this object belongs to a Document or not.
Creates a new fragment in a given context.
The elements.
(optional) the context. If omitted, will be automatically determined.
(optional) type of the document.
A new fragment.
Default constructor.
Creates a new instance of a DomFragment.
The new new.
Gets the type of the node. For DomFragment objects, this is always NodeType.DOCUMENT_FRAGMENT_NODE.
Gets a value indicating whether this object is indexed.
Gets a value indicating whether this object is fragment. For DomFragment objects, this is
true.
A CDATA node
Default constructor.
Constructor that populates the node with the passed value.
The contents of the CDATA node
Makes a deep copy of this object.
A copy of this object.
Gets or sets the node value. For CDATA nodes, this is the content.
Gets the type of the node. For CDATA nodes, this is NodeType.CDATA_SECTION_NODE.
Gets or sets the non-attribute data in the tag. For CDATA nodes, this is the same as the
content of the node..
Gets a value indicating whether HTML is allowed as a child of this element. For CDATA nodes,
this is always false.
Gets a value indicating whether this object has children. For CDATA nodes, this is always
false.
Gets or sets the text of the CDATA element.
A comment node
Default constructor.
Constructor for a comment containing the specified text.
The text.
Makes a deep copy of this object.
A copy of this object.
Gets the type of the node (COMMENT_NODE)
The type of the node.
The node (tag) name, in upper case. For a
The name of the node.
Gets or sets a value indicating whether this object is quoted.
TODO: Remove this. This has to do with GetTagOpener etc.
true if this object is quoted, false if not.
Gets a value indicating whether HTML is allowed as a child of this element (false)
true if inner HTML allowed, false if not.
Gets a value indicating whether this object has children (false)
true if this object has children, false if not.
Gets or sets the non-attribute data in the tag. For comments, this is the same as the text of
the comment. Null values will be converted to an empty string.
Gets or sets the node value. For CDATA nodes, this is the content.
A special type for the DOCTYPE node
Default constructor.
Constructor to create based on one of several common predefined types.
Type of the document.
Constructor to create a specific document type node
The type.
Identifier for the public.
Identifier for the system.
Sets document type data values from a doc type
Makes a deep copy of this object.
A copy of this object.
Gets the type of the node.
The node (tag) name, in upper case. For DOC_TYPE nodes, this is always "DOCTYPE".
Gets or sets the type of the document.
Gets or sets the information describing the content found in the tag that is not in standard
attribute format.
Gets a value indicating whether HTML is allowed as a child of this element. It is possible
for this value to be false but InnerTextAllowed to be true for elements which can have inner
content, but no child HTML markup, such as <textarea> and <script>
Gets a value indicating whether this object has children.
CSS style declaration.
Create a new CSSStyleDeclaration object with no styles.
Create a new CSSStyleDeclaration object for the text.
The parsable textual representation of the declaration block (excluding the surrounding curly
braces). Setting this attribute will result in the parsing of the new value and resetting of
all the properties in the declaration block including the removal or addition of properties.
Create a new CSSStyleDeclaration object for the text.
The parsable textual representation of the declaration block (excluding the surrounding curly
braces). Setting this attribute will result in the parsing of the new value and resetting of
all the properties in the declaration block including the removal or addition of properties.
When true, validate against CSS3 rules.
Create a new CSSStyleDeclaration object thatis a child of another rule.
The parent rule.
Warning: Do not attempt to access _Styles directly from this class or any subclass to determine whether or
not there are styles, since it also depends on QuickSetStyles. Use HasStyles method instead.
Create a clone of this CSSStyleDeclaration object bound to the owner passed.
CSSStyleDeclaration.
Sets all the styles from a single CSS style string. Any existing styles will be erased.
Styles will be validated and an error thrown if an invalid style is attempted.
A legal HTML style string.
Sets all the styles from a single CSS style string. Any existing styles will be erased. This
method is used by DomElementFactory (not in strict mode).
A legal HTML style string.
When true, the styles will be validated and an error thrown if any are not valid.
Add one or more styles to this element. Unlike SetStyle, existing styles are not affected,
except for existing styles of the same name.
The CSS style string
When true, the styles will be validated as CSS3 before adding.
Remove a single named style
Removes the style from the style descriptor for this element.
The name.
true if it succeeds, false if it fails. this can only fail if the style was not present.
Add a single style
Remove all styles
Returns true if the named style is defined
Sets style setting with no parsing
Try to get the value of the named style.
The name of the style
[out] The value.
true if the named style is defined, false if not.
Gets a style by name
The style name
The style, or null if it is not defined.
Sets a named style, validating its format.
The style name
The style value
Thrown if the style name and value are not valid CSS
Sets a named style, validating its format.
Thrown if the style name and value are not valid CSS
The style name.
The style value.
When true, the styles will be validated and an error thrown if any are not valid.
Returns the numeric value only of a style, ignoring units
The style.
A double, or null if the style did not exist or did not contain a numeric value.
Return the formatted string representation of this style, as HTML.
A string.
Return an enumerator that exposes each style name/value pair
The enumerator.
Returns the options for this style as a comma-separated list
The style.
A comma-separated string
Cleans/validates a CSS units string, or throws an error if not possible.
Thrown when one or more arguments have unsupported or illegal values.
The style name.
The value to validate
A parsed string of the value
Inner dictionary of the styles.
For fast DOM creation - since styles are not indexed or validated.
If they are ever accessed by style name, they will be parsed on demand.
The CSS rule that contains this declaration block or null if this CSSStyleDeclaration is not
attached to a CSSRule.
Event queue for all listeners interested in OnHasStylesChanged events.
The number of properties that have been explicitly set in this declaration block.
The parsable textual representation of the declaration block (excluding the surrounding curly
braces). Setting this attribute will result in the parsing of the new value and resetting of
all the properties in the declaration block including the removal or addition of properties.
True if there is at least one style.
Gets the number of styles in this collection.
Gets a value indicating whether this object is read only. For CSSStyleDeclarations, this is
always false.
Gets the style name (keys) for all the styles in this collection
Gets the style name values for all the styles in this collection
Get or set the named style
Get or set the named style, optionally enabling strict mode.
The named style
When true, validate for CSS3
The indexed item.
Gets or sets the CSS height.
Gets or sets the CSS width.
Reference data about HTML tags and attributes;
methods to test tokens for certain properties;
and the tokenizer.
Length of each node's path ID (in characters), sets a limit on the number of child nodes before a reindex
is required. For most cases, a small number will yield better performance. In production we probably can get
away with just 1 (meaning a char=65k possible values).
NOTE: At present PathID has been optimized as a ushort data type. You CANNOT just change this.
The character used to separate the unique part of an index entry from its path. When debugging
it is useful to have a printable character. Otherwise we want something that is guaranteed to be
a unique stop character.
Special token meaning "do nothing"
Special token meaning "close the parent tag before opening the next one"
Identifier for the Class attribute.
Identifier for the Value attribute.
Identifier for the ID attribute.
Identifier for the selected attribute.
Identifier for the readonly attribute.
Identifier for the checked attribute.
The INPUT tag.
The SELECT tag.
The OPTION tag.
The P tag.
The TR tag.
The TD tag.
The TH tag.
The HEAD tag.
The BODY tag.
The DT tag
The COLGROUP tag.
The DD tag
The LI tag
The DL tag
The TABLE tag.
The OPTGROUP tag.
The UL tag.
The OL tag.
The TBODY tag
The TFOOT tag.
The THEAD tag.
The RT tag.
The RP tag.
The SCRIPT tag.
The TEXTAREA tag.
The STYLE tag.
The COL tag.
The HTML tag.
The BUTTON tag.
The BUTTON tag.
the A tag
the SPAN tag
the SPAN tag
The REQUIRED attribute.
The REQUIRED attribute.
The TYPE attribute.
The PROGRESS element
The LABEL element
The DISABLED attribute
The METER element
The IMG element
The IMG element
should match final tag above; for self-checking.
Indicates whether this has been compiled in debug mode. When true, DOM index paths will be
stored internally in extended human-readable format.
Things that can be in a CSS number
The units that are allowable unit strings in a CSS style..
http://www.w3.org/TR/css3-values/#relative-lengths
Fields used internally
This type does not allow HTML children. Some of these types may allow text but not HTML.
The token ID
true if it succeeds, false if it fails.
This type does not allow HTML children. Some of these types may allow text but not HTML.
The node name to test.
true if HTML nodes are not allowed as childredn, false if they are.
Test whether this element may have children.
The token ID.
When false, this element type may never have children.
Test whether this element can have children.
The node name to test.
When false, this element type may never have children.
Test whether the node is a block-type element.
The token ID of the node
true if the token ID represents a block type element, false if not.
Test whether the node is a block-type element
The node name to test.
true if a block type, false if not.
Test whether the attribute is a boolean type.
The token ID
true if boolean, false if not.
Test whether the attribute is a boolean type.
The attribute or property name
true if boolean, false if not.
Test whether an attribute has case-insensitive values (for selection purposes)
Name of the attribute.
true if the values are case insensitive, false if not.
Test whether an attribute has case-insensitive values (for selection purposes)
Token ID of the attribute.
true if the values are case insensitive, false if not.
Test if a node type has a VALUE property.
The node name token.
true if it has a VALUE property, false if not.
Test if a node type has a VALUE property.
Token ID of the node name.
true if it has a VALUE property, false if not.
Test if the node name is a form input control.
The node name to test.
true if a form input control, false if not.
Test if the node name is a form input control
The node name token.
true if a form input control, false if not.
Return a token for a name
The name to tokenize.
The token
Return a token for a name, adding to the index if it doesn't exist. When indexing tags and
attributes, TokenID(tokenName) should be used.
The name to tokenize
A token representation of the string
Return a token ID for a name, adding to the index if it doesn't exist. When indexing tags and
attributes, ignoreCase should be used.
The token name
A token
Return a token name for an ID.
The token ID
The string, or an empty string if the token ID was not found
Encode to base XX (defined in constants)
Thrown when an arithmetic overflow occurs.
The number to baseXX encode
A baseXX encoded string
HtmlEncode a string, except for double-quotes, so it can be enclosed in single-quotes.
The text to encode
When true, the attribute value will be quoted even if quotes are not required by the value.
[out] The quote character.
The encoded string
Decode HTML-encoded text.
The HTML.
Decoded html.
For testing only - the production code never uses this version.
.
.
.
.
Determine a course of action given a new tag, its parent, and whether or not to treat this as
a document. Return 1 to close, 0 to do nothing, or an ID to generate.
The parent tag ID
The new tag ID found
A tokenId representing an action or a new tag to generate
Return the type of action that should be performed given a tag, and a new tag found as a
child of that tag.
Some tags have inner HTML but are often not closed properly. There are two possible
situations. A tag may not have a nested instance of itself, and therefore any recurrence of
that tag implies the previous one is closed. Other tag closings are simply optional, but are
not repeater tags (e.g. body, html). These should be handled automatically by the logic that
bubbles any closing tag to its parent if it doesn't match the current tag. The exception is
<head> which technically does not require a close, but we would not expect to find
another close tag Complete list of optional closing tags: HTML, HEAD, BODY, P, DT, DD, LI,
OPTION, THEAD, TH, TBODY, TR, TD, TFOOT, COLGROUP
body, html will be closed automatically at the end of parsing and are also not required.
The parent tag's token.
The new child tag's token.
A tag action code indicating that nothing special should happen or the parent tag should be
closed; or alternatively the token for a tag that should be generated in place before the new
tag is opened.
For each value in "tokens" (ignoring case) sets the specified bit in the reference table.
A sequence of tokens
The bitflag to set
For each value in "tokens" sets the specified bit in the reference table.
The sequence of tokens
The bitflag to set
Set the specified bit in the reference table for "token".
The token
The bit to set
A list of all keys (tokens) created.
Used for literal text (not part of a tag)
Create a new empty Text node
Create a new Text node containing the text passed
The text value of this Text node.
The inner node value; the text.
Makes a clone of this TextNode
A copy of this object.
Return the value of this text node
This object as a string.
The node (tag) name, in upper case. For Text nodes, this is always "#text".
Gets the type of the node. For Text nodes, this is always NodeType.TEXT_NODE
Gets or sets the text value of this Text node. Null values will be converted to an empty string.
Gets a value indicating whether HTML is allowed as a child of this element. For Text nodes,
this is always false.
For Text nodes, this is always false
Interface for node list, a read/write collection of nodes.
Get the item at the specified index
Zero-based index of the item
An item
The number of nodes in this INodeList
Wrapper class used by the engine to store info on the selector stack.
Figure out if an index matches an Nth Child, or return a list of all matching elements from a list.
Test if an element is the nth-child matching the output of a formula
The element to test
The formula.
Count from the last element instead of the first.
true if nth child of type implementation, false if not.
Test if an element is the nth-child matching the output of a formula
The element to test
The formula.
Count from the last element instead of the first.
true if nth child, false if not.
Enumerates nth children of the same type as the parent.
This could be implemented more efficiently, but it's a bit complicated because we need to keep track of n
for each type of element
The parent element.
The formula for determining n.
Count from the last element instead of the first.
A sequence of matching elements
Enumerates nth children in this collection.
The parent element.
The formula for determining n.
When true, count from the last element instead of the first.
An enumerator that allows foreach to be used to process nth childs in this collection.
Return the index of obj within its siblings, including only elements with the same node name.
The object to seek
true to only objects of the same NodeName should be considered
Count from the last element instead of the first.
The zero-based index of obj within its siblings (or its siblings of the same type)
Return true if the index matches the formula provided.
The index to test
The formula
Count from the last element instead of the first.
true if it succeeds, false if it fails.
Return true if the index matches the formula provided.
The index to test.
The formula.
true if it succeeds, false if it fails.
Return each child that matches an index returned by the forumla
The parent object.
The formula for determining n.
The type of node to match.
Count from the last element instead of the first.
An enumerator that allows foreach to be used to process get matching children in this
collection.
Return each child that matches an index returned by the forumla.
The parent object.
The formula for determining n.
An enumerator that allows foreach to be used to process get matching children in this
collection.
Return each child that matches an index returned by the forumla.
The parent object.
Sequence of matching children.
Return the correct child from a list based on an index, and the fromLast setting. That is, if fromLast is
true, just return the child at "index." If not, return the child starting from the end at "index"
The container to obtain children from
The index
Count from the last element instead of the first.
The effective child.
Gets the true index based on an effective index. (Misnomer, consider changing, should be
GetActualIndex)
The container to obtain children from
The index
Count from the last element instead of the first.
The actual index.
Return the correct child from a list based on an index, and the current "FromLast" setting
Parse the equation text into in IEquation, or obtain from the cache if available
Check if it was just a number passed (not an equation) and assign the correct delegates to matching
Returns a parsed equation from a string, validating that it appears to be a legitimate nth-child equation
Replaces _Text with the correct equation for "even" and "odd".
The equation
The new equation
Test whether an index matches a hard index passed by the formula. (This is one of two
implementations used via delegate)
The index to test.
true if it matches, false if not.
Test whether an index matches the calculated (or cached) value of a formula. (This is one of
two implementations used via delegate)
.
true if it succeeds, false if it fails.
Enumerates each child that matches a hard number passed as a formula (one of two
implementations used via delegate)
The parent element.
An sequence of the single matching child, or an empty sequence if none match.
Enumerates the child elements that match a formula (one of two implementations used via
delegate)
The parent element.
A sequence of matching children.
Get the next matching index using the equation and add it to our cached list of equation
results.
The last index used
When true, the current equation is just a number, and the MatchOnlyIndex value should be used directly
Only nodes with this name will be included in the count to determine if an index matches the equation
The formula for this nth child selector
A structure to keep information about what has been calculated so far for a given equation string.
NthChild is expensive so we cache a list of matching element IDs for a given equation along with the
last index this list represents and the iteration. The next time it's called we can either reference
the list of matches so far, or update it only from the point where we stopped last time.
Default constructor.
The equation.
The indices which match the equation. This may be incomplete, as it may only have been calculated up to the number
of children present in the prior use.
The next iterator value, used to resume calculations where it was left off.
The maximum target index value calculated so far
Select implementation. The public method automatically remaps a selector with the knowledge
that the context is external (and not part of a chain)
Thrown when one or more required arguments are null.
The context in which the selector applies. If null, the selector is run against the entire
Document. If not, the selector is run against this sequence of elements.
A list of elements. This method returns a list (rather than a sequence) because the sequence
must be enumerated to ensure that end-users don't cause the selector to be rerun repeatedly,
and that the values are not mutable (e.g. if the underlying source changes).
Get the sequence that is the source for the current clause, based on the selector, prior
results, and context.
Notes from refactoring this on 10/14/2012: At issue is selectors like ":not(.sel1 .sel2,
:first) where the subselector has filters that apply to just the context, versus selectors
like ":has(.sel1 .sel2, :first) where the subselector needs to apply to the results of a
selection against the DOM
case1: $('.sel','.context-sel') means that ".sel" is actually applied against .context-sel.
it's like .find.
totally different from a subselector -- but the subselector still needs a context to apply
filters, even though the selectors theselves are run against the whole doc.
so we need to set up selectors before running against the context so each subselector is IDd
as either "context" or "root" in addition to its traversal type to eliminate ambiguity of
intent. a subselector for :not should have "root+descendant" for the first part and
"context+filter" for the 2nd. For regular context type filters, it should be
"context+descendant" (same as find). FOr complex context/find filters chained with a comma,
the stuff after the comma should also be in context though jquery seems inconsistent with
this.
This code here should then use the new info to select the correct sleection source. Think we
should be rid of traversaltype.subselect. Think traversaltype.all should really mean "include
the context items" instead of "Descendant" as it does now.
The current selector clause.
The context passed initially to this Select operation.
The result of the prior clause. Can be null.
The sequence that should source the current clause's context.
Return all elements matching a selector, within a list of elements. This function will
traverse children, but it is expected that the source list at the current depth (e.g. from an
Adjacent or Sibling selector) is already processed.
The sequence of elements to filter.
The selector.
The sequence of elements matching the selector.
Return true if an object matches a specific selector. If the selector has a desecendant or child traversal type, it must also
match the specificed depth.
The jQuery/CSS selector
The target object
The depth at which the target must appear for descendant or child selectors
Return all position-type matches. These are selectors that are keyed to the position within
the selection set itself.
The list of elements to filter
The selector
A sequence of elements matching the filter
Return all child elements matching a DOM-position type selector
Return true if an element matches a specific filter.
The element to test
A selector clause
true if matches pseudo class, false if not.matches the selector, false if not
Map a list to its siblings or adjacent elements if needed. Ignore other traversal types.
Map a list to its children or descendants, if needed.
Return all children of each element in the list
Return all descendants of each element in the list
The current selection list being acted on
The Document bound to this engine instance
Extension methods used by CsQuery but not specialized enough to be considered useful for clients; therefore
in a separate namespace.
Returns true if the enum is any of the parameters in question.
The enum object
The values to test for
true if one of, false if not.
Returns true if the string "match" is any of the parameters in question.
The match to act on.
The values to test for.
true if one of, false if not.
Returns true if the enum is any of the parameters in question.
The match to act on.
(optional) the match case.
The values to test for.
true if one of, false if not.
Return the integer value for an enum.
The enum value
An integer.
Return the integer value cast as a string for an enum
Add all the items in a sequence to a collection.
The type of the collections.
The target collection
The elements to add
Return true of a given collection is null or has no values
Try to get the first element of a sequence. If the sequence is null or has no elements, return false.
Return a single element or the default value; does not fail on >1 value but also returns the default.
Converts a character array to a string.
The character array
A string of the sequence of characters
Return the number of occurrences of "find" in "text"
The text to search
The text to find.
An integer
Given a string that repesents a list demarcated by separator, add a new value to it
Given a string that is a list demarcated by separator, remove a value from it
Returns the text between startIndex and endIndex (exclusive of endIndex)
Remove all whitespace from a string
Returns the part of the string before the last occurence of the operand.
The text on which to perate
The text to find.
The portion of the text before the beginning of the last occurence of "find"
Returns the string after the end of the first occurrence of "find".
The text to search within
The text to find.
The portion of the text after the first occurence of "find"
Return the part of the string that is after the last occurrence of the operand
The source string
The text to find
Return the part of a string that is before the first occurrence of the operand
The source string
The text to find
Clean a string by converts null to an empty string and trimming any whitespace from the beginning and end
Perform a string split using whitespace demarcators (' ', tab, newline, return) and trimming each result
Perform a string split that also trims whitespace from each result and removes duplicats
Perform a string split that also trims whitespace from each result and removes duplicats
Reverse the contents of the StringBuilder
The StringBuilder
Reverse a string
The string
A new string
Return a substring from a character array starting at the startIndex provided of the
specified length.
The source text.
The starting index.
The length of the substring to extract.
The substring.
Return a substring from a character array from the starting index to the end of the array.
The source text.
The starting index.
The substring.
Return the position of the first occurrence of a string in a character array.
The text to seek within
The tarket
The index of the target, or -1 if not found
Return the position of the first occurrence of a string in a character array that is on or
after startIndex.
.
.
.
.
Convert a single character to lower case
The character to act on.
The lowercased character
Convert a single character to upper case
The character to act on.
The uppercased character
Return the index of item in an array. If count is > 0 then that is considered the length of
the array.
.
.
.
.
.
Return the default StringComparer class that implements the behavior for a StringComparison
The comparison to act on.
.
(Alpha) Clone a sequence of objects.
(Alpha) Deep clone a sequence of objects.
Represents async data from an ASP.NET webforms UpdatePanel
Populate the content from a ASP.NET updatepanel data block
Output this data block, recalulating the lengtht parameter based on the new output.
HTML string.
Output this data block, recalulating the lengtht parameter based on the new output, using the passed options.
Options for controlling the operation.
HTML string.
The content of the data packet (HTML). Probably, you'd rather be looking at the Dom property.
The length, in bytes, of the data component of this UpdatePanel data packet
Gets the DOM created from the HTML of this UpdatePanel data packet
Gets or sets the UpdatePanel identifier.
Gets or sets the type of the data. This is a Microsoft entity.
A group of async web requests.
NOT YET IMPLEMENTED
Adds a request to the queue.
URL of the document.
Adds a request to the queue.
The request.
A sequence of responses from the completed requests
An enumerator that allows foreach to be used to process results in this collection.
Gets the state of the request queue.
Interface representing a WebRequest
A CsqWebRequest object manages data and state related to a WebRequest
Creates a new CsqWebRequest for a given URL using the default IHttpWebRequestFactory.
URL of the document.
Creates a new CsqWebRequest for a URL using the provided IHttpWebRequestFactory. (Usually,
you should use the default constructor, unless replacing the .NET framework HttpWebRequest
object for testing or some other purpose)
URL of the document.
The web request factory.
Initiates an asynchronous GET request.
A delegate that will be invoked with the response data structure upon successful resolution
of the request.
A delegate that will be invoked with the response data structure upon failure.
A ManualResetEvent object for this asynchronous operation.
Initiates an asynchronous GET request from an IHttpWebRequest object.
The request.
A delegate that will be invoked with the response data structure upon successful resolution
of the request.
A delegate that will be invoked with the response data structure upon failure.
A ManualResetEvent object for this asynchronous operation.
Get the HTML using a synchronous HTTP request. This will return a string using the encoding
specified by the MIME type. If the document uses an encoding specified in a content-type
header, it will NOT be reflected by the results of this method.
The HTML returned by a successful request.
Initiate a synchronous GET request from an existing IHttpWebRequest object
The request.
The HTML returned by a successful request.
Gets a new HttpWebRequest object for the URL bound to this CsqWebRequest.
An HttpWebRequest.
Initiate an http POST request.
The data returned by the POST request
Initiate an http POST request.
URL of the document.
The data returned by the POST request
Initiate an http POST request.
URL of the document.
The information describing the post data to be sent this request.
The data returned by the POST request.
Gets response stream from a webrequest using the correct encoding. If the encoding is not
specified, then the encoding will be detected from the BOM.
The request.
The response stream.
Return the character set encoding for an IHttpWebResponse, or null if no encoding is
specified.
The response.
The encoding, or null if no encoding was specified on the response, or the specified encoding
was not recognized.
Gets options for controlling the operation.
The url to load.
The UserAgent string to present to the remote server.
Gets or sets a value indicating whether the asynchronous.
Returns true when this request has finished processing.
The CQ object representing the contents of the URL.
The time, in milliseconds, after which to abort an incomplete request.
A unique ID for this request. This will be automatically generated if not assigned.
Gets or sets the HTML.
Gets or sets the post data string.
Gets the information describing the post data to be sent this request.
A class encapsulating the functionality needed to make requests of remote web servers, and
return the HTML as a CQ object.
Creates an AsyncWebRequest for a WebRequest
The WebRequest object.
A ManualResetEvent returned by the async request.
Return a CQ object, treating the HTML as a complete document
Return a CQ object, treating the HTML as content
Begin the async request
Stream of the HTML response
Gets or sets the encoding of the response stream
Delegate to invoke upon successful completion of a request
Delegate to invoke when a request fails
A unique identifier for this request
The URL of the request
The time that the async request was initiated.
The time that the async request was completed
Indicates that an async request has completed.
True if the WebRequest was completed successfully.
When a request fails, contains the exception raised.
The WebRequest object
Text of any error that occurred.
The HTTP status code for the response.
The HTTP status description for the response.
The async HttpWebResponse
Return a document from the HTML web request result.
The HTML returned by the response.
Gets or sets the timeout, in milliseconds, for this AsyncWebRequest
Gets or sets the user agent.
Configuration opttions used when accessing remote resources
Configure the "default default" settings.
Merge any non-null options into a new options object.
The options
A new ServerConfig object
Apply these options to a web request.
The options.
The CsqWebRequest object to apply the options to.
The default settings used when making remote requests.
Gets or sets the user agent string that will be used to identify this service to the server
Gets or sets the timeout after which an incomplete request will be aborted
Gets or sets the timeout (in seconds) after which an incomplete request will be aborted
Web request state: a class encapsulating information about an async web request
A buffer
The WebRequest
The response stream.
Information describing the request.
Constructor.
Information describing the request.
A list of DOM elements. The default order is the order added to this construct; the Order
property can be changed to return the contents in a different order.
The type of element represented by this set.
Create an initially empty instance whose results are returned in the order specified.
The output order.
Create an instance based on an existing sequence. The order passed defines the order of the
original list; if the output order should be different than change it.
The sequence is bound directly as the source of this selection set; it is not enumerated.
Therefore it's possible to create "live" sets that will reflect the same contents as their
original source at any point in time. If a client alters the selection set, however, it
becomes static as the set at that point is copied in order to permit alterations. The
original source sequence is never altered, even if it is a list type that can be altered.
Because of this care is required. If using an IEnumerable source that is not a basic data
structure, but instead refers to a computationally-intensive process, it might be desirable
to copy it to a list first. The output from the HTML parser and selector engine do this
automatically to prevent accidental misuse. It is conceivable that some future function might
want to provide direct access the the selector engine's IEnumerable output instead of a List
copy to provide a live CSS selector; in this case the engine's Select method would need to be
altered to return the enumerator directly.
The sequence to source this selection set.
The list order.
The output order.
Cached count
The immutable list as set by a client; can be obsolete if MutableList is non-null
Cached reference to the list in the output order
The active list, if changes are made after set by the client
Adds a new item to the SelectionSet
The item to add.
true if it succeeds, false if it fails.
Clears this SelectionSet
Makes a clone of this SelectionSet
A copy of this object.
Enumerates clone objects in this collection.
An enumerator that allows foreach to be used to process clone objects in this collection.
Test whether the item is present in the SelectionSet
The item to test for containment.
true if the object is in this collection, false if not.
Copy the contents of this SelectionSet to an array
The target array.
Zero-based index of the starting position in the array to begin copying.
Removes the given item from the SelectionSet
The item to remove.
true if it succeeds, false if it fails.
Removes all elements in the specified collection from the current SelectionSet<T>
object.
The collection of items to remove from the SelectionSet<T> object.
Modifies the current SelectionSet<T> object to contain only elements that are present
in that object and in the specified collection.
The collection to compare to the current SelectionSet<T>
object.
Determines whether a SelectionSet<T> object is a proper subset of the specified
collection.
The collection to compare to the current SelectionSet<T> object.
true if it is a proper subset, false if not.
Determines whether a SelectionSet<T> object is a proper superset of the specified
collection.
The collection to compare to the current SelectionSet<T> object.
true if is is a proper superset, false if not.
Determines whether a SelectionSet<T> object is a subset of the specified collection.
The collection to compare to the current SelectionSet<T> object.
true if it is a proper subset, false if not.
Determines whether a SelectionSet<T> object is a superset of the specified collection.
The collection to compare to the current SelectionSet<T> object.
true if is is a proper superset, false if not.
Determines whether the current SelectionSet<T> object and a specified collection share
common elements.
The collection to compare to the current System.Collections.Generic.HashSet<T>
object.
true if the sets share at least one common element; , false if not.
Determines whether a SelectionSet<T> object and the specified collection contain the
same elements.
The collection to compare to the current SelectionSet<T> object.
true if it succeeds, false if it fails.
Modifies the current SelectionSet<T> object to contain only elements that are present
either in that object or in the specified collection, but not both.
The collection to compare to the current SelectionSet<T> object.
Modifies the current SelectionSet<T> object to contain all elements that are present in
itself, the specified collection, or both.
The collection to compare to the current SelectionSet<T> object.
Return the zero-based index of item in a sequence.
The item.
The zero-based position in the list where the item was found, or -1 if it was not found.
Inserts an item at the specified index
Zero-based index of the position to insert the item
The item to insert.
Removes the item at the specified index.
Thrown when the index is outside the bound of the current set.
Zero-based index of the item to remove.
Gets the enumerator for the SelectionSet
The enumerator.
When an operation changes the original list, configures this object to track changes and deal
with altered lists.
Use after set operations that alter the list
The list, if it has been changed from the value with which it was created
The selection set in the output order.
The output (sorted) list is dirty because changes have been made since it was created. Update the cache.
The list is altered from its original state using "Add" or "Remove".
The order in which elements in the set are returned.
Gets the number of items in the SelectionSet
Gets a value indicating whether this object is read only. For SelectionSet objects, this is always false.
Indexer to get or set items within this collection using array index syntax.
Zero-based index of the entry to access.
The indexed item.
A dynamic object implementation that differs from ExpandoObject in two ways:
1) Missing property values always return null (or a specified value)
2) Allows case-insensitivity
Default constructor.
Create in instance using a comparer and a particular value for missing properties
The comparer.
The missing property value.
Initializes this object to its default state.
The comparer.
The missing property value.
Convert this object into a JSON string.
This object as a string.
Enumerates the property/value pairs
Generic type parameter.
An enumerator that allows foreach to be used to process enumerate< t> in this
collection.
Gets the strongly-typed value of a property
Generic type parameter.
The property name
The value, or null if the value does not exist.
Return the value of a property as a strongly-typed sequence
Thrown when one or more arguments have unsupported or illegal values.
The type of value expected in the property
The name of the property
A sequence of values of type T
Gets a value for a named property
The property name.
The value
Provides the implementation for operations that get member values. Classes derived from the
class can override this method to specify
dynamic behavior for operations such as getting a value for a property.
Provides information about the object that called the dynamic operation. The binder.Name
property provides the name of the member on which the dynamic operation is performed. For
example, for the Console.WriteLine(sampleObject.SampleProperty) statement, where sampleObject
is an instance of the class derived from the
class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether
the member name is case-sensitive.
The result of the get operation. For example, if the method is called for a property, you can
assign the property value to .
true if the operation is successful; otherwise, false. If this method returns false, the run-
time binder of the language determines the behavior. (In most cases, a run-time exception is
thrown.)
Provides the implementation for operations that get member values. Classes derived from the
class can override this method to specify
dynamic behavior for operations such as getting a value for a property.
Thrown when a key not found error condition occurs.
.
The type.
The result of the get operation. For example, if the method is called for a property, you can
assign the property value to .
true if the operation is successful; otherwise, false. If this method returns false, the run-
time binder of the language determines the behavior. (In most cases, a run-time exception is
thrown.)
Provides the implementation for operations that set member values. Classes derived from the
class can override this method to specify
dynamic behavior for operations such as setting a value for a property.
Provides information about the object that called the dynamic operation. The binder.Name
property provides the name of the member to which the value is being assigned. For example,
for the statement sampleObject.SampleProperty = "Test", where sampleObject is an instance of
the class derived from the class, binder.Name
returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is
case-sensitive.
The value to set to the member. For example, for sampleObject.SampleProperty = "Test", where
sampleObject is an instance of the class derived from the
class, the is "Test".
true if the operation is successful; otherwise, false. If this method returns false, the run-
time binder of the language determines the behavior. (In most cases, a language-specific run-
time exception is thrown.)
Provides the implementation for operations that set member values. Classes derived from the
class can override this method to specify
dynamic behavior for operations such as setting a value for a property.
.
The value to set to the member. For example, for sampleObject.SampleProperty = "Test", where
sampleObject is an instance of the class derived from the
class, the is "Test".
true if the operation is successful; otherwise, false. If this method returns false, the run-
time binder of the language determines the behavior. (In most cases, a language-specific run-
time exception is thrown.)
Test if a named property exists
The property name
true if the property exists, false if not.
Deletes a named property.
The property to delete.
true if it succeeds, false if it fails.
Returns a new JsObject from a dictionary of key/value paris
The value to set to the member. For example, for sampleObject.SampleProperty = "Test", where
sampleObject is an instance of the class derived from the
class, the is "Test".
value as a JsObject.
Returns the enumeration of all dynamic member names.
A sequence that contains dynamic member names.
The enumerator
The enumerator.
When true, accessing missing properties will return MissingPropertyValue instead of throwing
an error.
An object or value to be returned when missing properties are accessed (assuming they are allowed)
When true, the property names will not be case sensitive
The dictionary of properties
Return the value of a named property
The name.
The indexed item.
A list of nodes representing the children of a DOM element.
Constructor binding this list to its owner
The object that owns this list (the parent)
Get the item at the specified index.
Zero-based index of the item.
An item.
The zero-based index of the item in this list
The element to add.
The zero-based index of the item, or -1 if it was not found.
Add a child to this element.
The element to add
Add a child without validating that a node is a member of this DOM already or that the ID is unique
Adds a child element at a specific index.
The index at which to insert the element
The element to insert
Remove an item from this list and update index.
Remove an element from this element's children.
The item to remove.
true if it succeeds, false if the item was not found in the children.
Adds a range of elements as children of this list.
An IEnumerable<IDomObject> of items to append to this.
Remove all children of this node
Query if this object contains the given item.
The item to look for.
true if the object is in this collection, false if not.
Copies this list to an array.
The array.
Zero-based index of the starting point in the array to copy to.
Gets the enumerator.
The enumerator.
The inner list of objects.
Gets or sets the object that owns this list (the parent)
Indexer to get or set items within this collection using array index syntax.
Zero-based index of the entry to access.
The indexed item.
Gets the number of items in this list.
The number of nodes in this INodeList.
Gets a value indicating whether this object is read only. For ChildNodeList collections, this
is always false.
A dictionary that is substring-lookup capable. This is the data structure used to index HTML
documents for selectors. A SortedSet of keys is used for the index because it allows fast
access by substring. A list of keys obtained from the SortedSet for a selector is used to
obtain the target references from a regular dictionary.
Type of the key.
Type of the value
Default constructor.
The comparer.
The equality comparer.
The index separator.
An ordered set of all the keys in this dictionary.
The inner index.
Retrieve all the keys that match the subkey provided; that is, all keys that start with the
value of 'subkey'.
The subkey to match
A sequence of keys found in the dictionary.
Return all matching keys at the specified depth relative to the subkey, e.g. 0 will return
only the element that exactly matches the subkey.
The subkey to match.
The zero-based depth relative to the subkey's depth
When true, include elements that are at a greater depth too
A sequence of TValue elements.
Return a sequence of values for each key that starts with the value of 'subkey'.
The subkey to match.
A sequence of values from the dictionary.
Adds a key/value pair to the dictionary
The key.
[out] The value.
Test whether the dictionary contains a value for 'key'
The key.
true if it succeeds, false if it fails.
Removes the given key
The key.
true if it succeeds, false if it fails.
Try to get a value by name
The key.
[out] The value.
true if it succeeds, false if it fails.
Adds a key/value pair to the dictionary.
The item to test for.
Clears this object to its blank/initial state.
Test whether the KeyValuePair object exists in this dictionary.
The item to test for.
true if the object is in this collection, false if not.
Copies the contents of the dictionary to an array of KeyValuePair objects.
The array.
Zero-based index of the array at which to start copying.
Removes the given KeyValuePair from the dictionary if it exists
The item to remove.
true if it succeeds, false if it fails.
Gets the enumerator.
The enumerator.
Returns the keys in human-readable format.
Gets the values.
Return the value for 'key'
The key.
The indexed item.
Gets the number of items in this dictionary.
Gets a value indicating whether this object is read only. This is always false.
Server extension to CsQuery -- adds functionality for dealing with postbacks, and getting data from
external sources
Constructor for CsQueryHttpContext. Usually, you should use WebForms.CreateFromRender to
create one of these.
The context.
The ASP.NET WebForms Page object bound to this context.
The writer.
The render method.
Renders the DOM to the bound TextWriter.
Renders the DOM to the bound TextWriter with the passed options
Options for controlling the operation.
Create a context from the bound method information
Gets or sets the current HttpContext.
The context.
Gets the writer.
The interim writer
A delegate to the Render method of a WebForms Page object
A reference to the HtmlTextWriter passed into the Render method
The ASP.NET WebForms Page object bound to this context
The CQ object representing the output from the Render method.
The dom.
Gets a value indicating whether this is an asynchronous get (e.g., an UpdatePanel).
true if this object is asynchronous, false if not.
Sequence of AsyncPostbackData objects representing the HTML and metadata for each UpdatePanel
that is part of the response
Object encapsulating the UpdatePanel data.
A parsed selector, consisting of one or more SelectorClauses.
Creates an empty selector
Create a new selector from a single selector clause
The clause
Create a new selector from a sequence of selector clauses.
A sequence of clauses to build this selector
Create a new selector from any string.
The CSS selector string, or a string of HTML.
Create a new selector from DOM elements.
A sequence of elements.
Create a new selector from a single element.
The element to test.
Adds a clause to this selector.
The clause to insert.
Convert this selector to a context filter, meaning any open :filter type selectors will be
applied against the context instead of the root. This differs from a Context selector in that
non-filter selectors are still run against the document root, whereas in a Context selector,
they are run against the context itself. This type is used for filters and "Is" and "Not",
the Context type is used for "Find" and objects created with context.
The context.
Convert this selector to apply the context only: changes Root selectors to be applied to
Context+Descendant traversal type. This is used to create selectors for use with "Find"
A new selector.
Gets a new selection engine for this selector
The document that's the root for the selector engine
The new engine.
Insert a selector clause at the specified position.
Thrown if the selector is not valid to insert at this position.
The position in the selector chain to insert this clause
The clause to insert
(optional) type of the combinator.
Return the elements of document that match this selector
The document against which to select
The sequence of matching elements
Return the elements of document that match this selector within a context.
The document against which to select.
The context to select against. Context should be contained within document.
The sequence of matching elements.
Return the elements of document that match this selector within a context.
The document against which to select.
The context to select against. Context should be contained within document.
The sequence of matching elements.
Return only elements of sequence that match this selector.
The DOM to which the members of the sequence belong.
The sequence to filter.
A sequence of matching elements, which is a subset of the original sequence.
Test if a single element matches this selector.
The document context
The element to test
true if it succeeds, false if it fails.
Return only elements from the sequence that do not match this selector.
The document context.
The source sequence.
The elements from the source sequence that do not match this selector.
Return a clone of this selector.
A copy of this object.
Returns CSS selector string of this Selector. This may not exactly match the input clause since
it has been regenerated.
A CSS selector.
An enumerator to iterate over each clause in this selector
The enumerator.
The number of clauses in this selector
Indexer to get clauses of this selector by index.
Zero-based index of the entry to access.
The selector clause at the index specified
Gets a value indicating whether this object is an HTML selector (e.g. it's not really a
selector, but should return a new HTML fragment).
Gets a list of clauses in this selector
Gets a clone of the list of member clauses in this selector
Some extension methods that come in handy when working with CsQuery
Perform a substring replace using a regular expression.
The target of the replacement.
The pattern to match.
The replacement string.
A new string.
Perform a substring replace using a regular expression and one or more patterns
Thrown when the list of replacements is not the same length as the list of patterns.
The target of the replacement.
The patterns.
The replacements.
A new string.
Perform a substring replace using a regular expression.
The target of the replacement.
The pattern to match.
The evaluator.
A new string.
Test whether the regular expression pattern matches the string.
The string to test
The pattern
true if the pattern matches, false if not.
Append an element to the end of a sequence.
Generic type parameter.
The list to act on.
The element to append.
The combined sequence.
Return the zero-based index of the first item in a sequence where the predicate returns true
Type of object in the sequence
The sequence to search through.
The predicate.
The zero-based position in the list where the item was found, or -1 if it was not found.
Return the zero-based index of the first item in a sequence where the predicate returns true,
and return the matched item as an output parameter.
Generic type parameter.
The sequence to search through.
The predicate.
[out] The matched item.
The zero-based position in the list where the item was found, or -1 if it was not found.
Return the last zero-based index of the first item in a sequence where the predicate returns true,
and return the matched item as an output parameter.
Generic type parameter.
The sequence to search through.
The predicate.
[out] The matched item.
The zero-based index of the last match, or -1 if not found
Return the zero-based index of item in a sequence.
The type of elements in the sequence.
The sequence to search through.
The target collection.
The zero-based position in the list where the item was found, or -1 if it was not found.
Iterate over a sequence, calling the delegate for each element.
The type of object in the sequence.
The sequence.
The action to invoke for each object.
Iterate over a sequence, calling the delegate for each element. The delegate should accept
two parameters, the object T and the index of the current iteration.
The type of object in the sequence.
The sequence.
The action to invoke for each object.
Serailize the object to a JSON string
Deserialize the JSON string to a typed object
Deserialize the JSON string to a dynamic object or a single value.
The JSON string.
A new object created from the json.
Indicates whether a property exists on an ExpandoObject
Return a typed value from a dynamic object
Clone a sequence of elements to a new sequence
The source sequence
A sequence containing a clone of each element in the source.
Reduce the set of matched elements to a subset beginning with the 0-based index provided.
The array to act on.
The 0-based index at which to begin selecting.
The 0-based index of the element at which to stop selecting. The actual element at this
position is not included in the result.
A new array of the same type as the original.
Reduce the set of matched elements to a subset beginning with the 0-based index provided.
The array to act on.
The 0-based index at which to begin selecting.
A new array of the same type as the original.
Some static methods that didn't fit in anywhere else.
Read all text of a file, trying to find it from the execution location if not rooted.
Open a stream for a file, trying to find it from the execution location if not rooted.
Given a partial path to a folder or file, try to find the full rooted path. The topmost part
of the partial path must be part of the current application path; e.g. there must be an
overlapping part on which to match.
The partial path to find.
[out] Full pathname of the file.
true if it succeeds, false if it fails.
Given a partial path to a folder or file, try to find the full rooted path. The topmost part
of the partial path must be part of the current application path; e.g. there must be an
overlapping part on which to match.
The partial path to find
The file path.
Given a rooted path to look within, and a partial path to a file, the full path to the file.
Thrown when one or more arguments have unsupported or illegal values.
The partial path to find.
The rooted path to match within
The full rooted path the the file.
Given a partial path to a folder or file, try to find the full rooted path. The topmost part
of the partial path must be part of the current application path; e.g. there must be an
overlapping part on which to match.
The partial path to find.
The rooted path to match within.
[out] Full pathname of the output file.
true if it succeeds, false if it fails.
Gets the first assembly that is not the assembly that this method belongs to
Thrown when the requested operation is invalid.
The first external assembly.
Gets a resource from the calling assembly
Gets a resource name using the assembly and resource name
Gets an embedded resource from an assembly by name
The resource name
The assembly name
The resource stream.
Convert a string to a stream using ASCII encoding.
The stream.
A string.
Convert slashes to backslashes; make sure there's one (or zero, if not rooted) leading or
trailing backslash; resolve parent and current folder references. Missing values are
returned as just one backslash.
The path to clean
A cleaned/resolved path
Combine two file paths, normalizing slashes and eliminating any relative path markers.
The first path.
The second path.
A combined path.
Get a fully qualified namespaced path to a member
Get a fully qualified namespaced path to a member.
The type to inspect.
Name of the member.
A string
Get a fully qualified namespaced path to a type, e.g. "CsQuery.Utility.Support.TypePath"
The type to inspect
A string
Conver a stream to a character array.
The stream.
A character array.
Copies files matching a pattern.
Thrown when one or more arguments have unsupported or illegal values.
Source for the.
Destination for the.
true to overwrite, false to preserve.
One or more file matching patterns to match.
Copies files matching a pattern. Existing files will be overwritten.
Source directory for the files
Destination directory.
One or more file matching patterns to match.
Deletes the files in a directory matching one or more patterns (nonrecursive)
Thrown when the directory is missing
Directory where files are located.
One or more file matching patterns to delete
Convert a string value to a double, or zero if non-numeric
The value.
A double.
Convert a string value to an integer, or zero if non-numeric
The value.
An integer
Return an int or double from any number.
The number to convert
The converted number
Given a string, convert each uppercase letter to a "-" followed by the lower case letter.
E.g. "fontSize" becomes "font-size".
The string to uncamelcase
A string
Converts a name from dashed-separators to camelCase.
The string to camelCase.
(optional) when true, the first letter of the resuling word is captalized.
a dased-separated string.
Converts a value to an enum, assuming the enum is camelcased.
Generic type parameter.
The value.
value as a T.
Convert an enum to a lowercased attribute value
The value.
The attribute value of a string
Return a stream, including BOM preamble, from a string
The HTML.
The encoding.
The encoded stream.
A set of utility functions for testing objects.
Returns true of the type is a generic nullable type OR string
Returns true if the object is a string, and appears to be JSON, e.g. it starts with a single
curly brace.
The object to test.
true if json, false if not.
Tests whether an object is a common immutable, specifically, value types, strings, and null.
KeyValuePairs are specifically excluded. (Why?)
.
true if immutable, false if not.
Returns false if this is a value type, null string, or enumerable (but not Extendable)
.
true if extendable type, false if not.
Returns true when a value is "truthy" using same logic as Javascript.
null = false; empty string = false; "0" string = true; 0 numeric = false; false boolean =
false.
The object to test.
true if truthy, false if not.
Returns true if the object is a primitive numeric type, that is, any primtive except string
& char.
The type to test.
true if numeric type, false if not.
Returns true if the value is a Javascript native type (string, number, bool, datetime)
The type to test
true if a Javascript native type, false if not.
Combine elements of an array into a single string, separated by a comma.
The array to join.
A string separated by a comma.
Combine elements of a sequenceinto a single string, separated by a comma.
A list of objects.
A string containging the string representation of each object in the sequence separated by a
comma.
Test if an object is "Expando-like", e.g. is an IDictionary<string,object>.
The object to test.
true if expando, false if not.
Test if an object is a an IDictionary<string,object> that is empty.
The object to test
true if empty expando, false if not.
Test if an object is a KeyValuePair<,> (e.g. of any types)
The object to test
true if key value pair, false if not.
Coerce a javascript object into a Javascript type (null, bool, int, double, datetime, or string). If you know what the
type should be, then use Convert instead.
Convert an object of any value type to the specified type using any known means.
Thrown when an object cannot be cast to a required type.
Generic type parameter.
The object to convert
An object of the target type
Convert an object of any value type to the specified type using any known means.
Thrown when an object cannot be cast to a required type.
The object to convert
The target type
An object of the target type
Convert an object of any value type to the specified type using any known means.
Generic type parameter.
The object to convert.
(optional) the default value.
An object of the target type.
Try to convert any object to the specified type
The target type
The object or value to convert.
[out] The typed value.
true if it succeeds, false if it fails.
Try to convert an object or value to a specified type, using a default value if the
conversion fails.
The object or value to convert.
[out] The typed value.
The type to convert to
(optional) the default value.
true if it succeeds, false if it fails.
Returns an Object with the specified Type and whose value is equivalent to the specified
object.
This method exists as a workaround to System.Convert.ChangeType(Object, Type) which does not
handle nullables as of version 2.0 (2.0.50727.42) of the .NET Framework. The idea is that
this method will be deleted once Convert.ChangeType is updated in a future version of the
.NET Framework to handle nullable types, so we want this to behave as closely to
Convert.ChangeType as possible. This method was written by Peter Johnson at:
http://aspalliance.com/author.aspx?uId=1026.
Thrown when one or more required arguments are null.
An Object that implements the IConvertible interface.
The Type to which value is to be converted.
An object whose Type is conversionType (or conversionType's underlying type if conversionType
is Nullable<>) and whose value is equivalent to value. -or- a null reference, if value
is a null reference and conversionType is not a value type.
Try to parse a string into a valid number
Thrown when parsing fails
The value to parse
[out] The parsed value type
The Type to process.
true if it succeeds, false if it fails.
Enumerate the values of the properties of an object to a sequence of type T
Enumerate the values of the properties of an object to a sequence of type T
All properties with an attribute of these types will be ignored
Return the default value for a type.
The type
An value or null
Creates an instance of a type
The type
The new instance.
Creates an instance of type
Generic type parameter.
The new instance< t>
Returns a sequence containing a single element, the object passed by parameter.
The type of object.
The object to add to the sequence.
A sequence with one element.
Returns an enumeration composed of each object in the parameter list.
The generic type of the enumeration.
The sequence of objects.
An enumerator that allows foreach to be used to process enumerate< t> in this
collection.
Enumerates a sequence of objects
The sequence
An enumeration.
Returns an empty sequence of the specified type.
The generic type of the sequence.
An empty sequence.
Convert (recursively) an IDictionary<string,object> to a dynamic object.
Generic type parameter.
The source dicationary
A new dynamic object
Combine elements of a sequence into a single string, separated by separator.
The source sequence.
The separator.
A string.
Deal with datetime values
Takes a default deserialized value from JavaScriptSerializer and parses it into expando
objects. This will convert inner array types to strongly-typed arrays; inner object types to
dynamic objects; and inner date/time value strings to real datetime values.
The target type.
The value.
When true, date values will be parsed also. (This is likely problematic because of different
date conventions).
The deserialized converted value< t>
Return the proper type for an object (ignoring nullability)
Convert any IDictionary<string,object> into an expandoobject recursively.
The type of target to create. It must implementing IDynamicMetaObjectProvider; if it is
actually the interface IDynamicMetaObjectProvider, then the default dynamic object type will
be created.
The source dictionary
.
.
Map properties of inputObjects to target. If target is an expando object, it will be updated.
If not, a new one will be created including the properties of target and inputObjects.
When true, will clone properties that are objects.
The target of the mapping, or null to create a new target
One or more objects that are the source of the mapping
The target object itself, if non-null, or a new dynamic object, if the target is null
Converts a regular object to a dynamic object, or returns the source object if it is already
a dynamic object.
source as a JsObject.
Converts this object to a dynamic object of type T.
The type of dynamic object to create; must inherit IDynamicMetaObjectProvider and
IDictionary<string,object>
The object to convert.
The given data converted to a T.
Converts a regular object to an expando object, or returns the source object if it is already
an expando object. If "deep" is true, child properties are cloned rather than referenced.
The object to convert
When true, will clone properties that are objects.
The given data converted to a JsObject.
Converts this object to an expando object of type T.
The type of object; must inherit IDynamicMetaObjectProvider and IDictionary<string,
object>
The object to convert
When true, will clone properties that are objects.
The given data converted to a T.
Converts this object to an expando object of type T.
Generic type parameter.
The object to convert.
When true, will clone properties that are objects.
A sequence of Attribute objects that, when any is found on a property, indicate that it should be ignored.
The given data converted to a T.
Clone an object. For value types, returns the value. For reference types, coverts to a
dynamic object.
The source object.
The value passed or a new dynamic object.
Clone an object. For value types, returns the value. For reference types, coverts to a dynamic object.
The source object.
When true, will clone properties that are objects.
The value passed or a new dynamic object.
Remove a property from a dynamic object, or return a copy of the object a a new dynamic object without the property.
Thrown when the requested operation is invalid.
The source object
The property to delete
A new dynamic object
Implementation of "Extend" functionality
Implementation of object>expando
Try to parse an english or numeric string into a boolean value
Creates a new text node.
The text.
The new text node.
Creates a comment node.
The comment.
The new comment.
Creates a new empty document.
The new document.
Creates CDATA node
The data.
The new CDATA node
Creates a new, empty fragment node.
The new fragment.
Methods for working with JSON.
Convert an object to JSON using the default handling of the serializer.
The object.
JSON representation of the object.
Parse JSON into a typed object.
The type of object to reutrn.
The JSON string.
An object of type T populated with the data from the json source
Parse JSON into a typed object.
The JSON string
The type of object to return
An object of the specified type
Parse a JSON object or nameless JSON value into a dynamic object, or single typed value.
The JSON string
An object
Parse a single JSON value to a C# value of the specified type., if the
value is another object, an object or array.
The type of data to return
A string that represents a single nameless JSON value.
An object of the CLR datatype matching the value.
Thrown when the argument was not a valid JSON value.
Parse a single JSON value to a C# value (string, bool, int, double, datetime) or, if the value is
another object, an object or array.
Thrown when the argument was not a valid JSON value
A string that represents a single nameless JSON value
An object of the CLR datatype matching the value
Parse a JSON value to a C# CLR object of the type requested.
Thrown when the value could not be converted to the specified type
The JSON value.
The target type.
An object of the type specfiied.
Parse a JSON value to a C# value into the best matching CLR type for that JSON value type
The JSON value.
[out] The value.
true if successful, false if not.
Parse a JSON value to a C# value of the type requested.
The JSON value.
The target type.
[out] The value.
true if successful, false if not
The value represents a JSON date (MS format)
The JSON value
true if JSON date, false if not.
The value represents a JSON object, e.g. is bounded by curly braces.
the JSON value
true if JSON object, false if not.
The value represents a JSON string, e.g. is bounded by double-quotes.
The JSON value
true if JSON string, false if not.
The value represents a JSON array, e.g. is bounded by square brackets.
The JSON value
true if JSON array, false if not.
Try to parse a JSON value into a value type or, if the value represents an object or array,
an object. This method does not address numeric types, leaving that up to a caller, so that
they can map to specific numeric casts if desired.
Thrown when the value was not a valid JSON value.
The JSON value
[out] the convert and typecast CLR value
true if it succeeds, false if it fails.
Deserialize javscript, then transform to an ExpandObject
Orders in which the selection set can be arranged. Ascending and Descending refer to to the
DOM element order.
The items should be returned in the order they were added to the selection set.
The items should be returned in the order they appear in the DOM.
The items should be returned in the reverse order they appear in the DOM.