[][src]Crate marked

Parsing, filtering, selecting and serializing HTML/XML markup.

See the project ../README for a feature overview.

Modules

filter

Mutating visitor support for Document.

html

Support for html5 parsing to Document.

xml

Support for XML parsing to Document (xml feature).

Macros

chain_filters

Compose a new filter closure, by chaining a list of 1 to many closures or function paths. Each is executed in order, while the returned action remains Action::Continue, or otherwise terminated early.

Structs

Attribute

A tag attribute, e.g. class="test" in <div class="test" ...>.

Decoder

A TendrilSink adaptor that takes bytes, decodes them as the given character encoding, while replacing any ill-formed byte sequences with U+FFFD replacement characters, and emits Unicode (StrTendril).

Descender

A depth-first iterator returned by NodeRef::descendants.

Document

A DOM-like container for a tree of markup elements and text.

DocumentType

Document type definition details.

Element

A markup element with name and attributes.

EncodingHint

A set of confidence-weighted evidence that a text document is in a particular encoding.

Node

A typed node (e.g. text, element, etc.) within a Document including identifiers to parent, siblings and children.

NodeId

A Node identifier as a u32 index into a Documents Node vector.

NodeRef

A Node within Document lifetime reference.

ProcessingInstruction

Processing instruction details.

QualName

A fully qualified name (with a namespace), used to depict names of tags and attributes.

Selector

A selecting iterator returned by NodeRef::select.

Enums

NodeData

The node kind and payload data associated with that kind.

Constants

BOM_CONF

Recommended confidence for hints based on a leading Byte-Order-Mark (BOM) at the start of a document stream.

DEFAULT_CONF

Recommended confidence for an initial default encoding.

HTML_META_CONF

Recommended confidence for the sum of all hints from within an HTML head, in meta elements.

HTTP_CTYPE_CONF

Recommended confidence for a hint from an HTTP Content-Type header with charset.

INITIAL_BUFFER_SIZE

Initial parse buffer size in which encoding hints are considered, possibly triggering reparse.

READ_BUFFER_SIZE

Subsequent parse buffer size used for reading and parsing, after INITIAL_BUFFER_SIZE.

Type Definitions

LocalName
Namespace
SharedEncodingHint

An EncodingHint that can be shared between Decoder and Sink, by reference on the same thread, and internally mutated. The type is neither Send nor Sync.

StrTendril

Tendril for storing native Rust strings.