Struct xml5ever::rcdom::RcDom [] [src]

pub struct RcDom {
    pub document: Handle,
    pub errors: Vec<Cow<'static, str>>,
}

The DOM itself; the result of parsing.

Fields

document: Handle

The Document itself.

errors: Vec<Cow<'static, str>>

Errors that occurred during parsing.

Trait Implementations

impl TreeSink for RcDom
[src]

type Handle = Handle

Handle is a reference to a DOM node. The tree builder requires that a Handle implements Clone to get another reference to the same node. Read more

fn parse_error(&mut self, msg: Cow<'static, str>)

Signal a parse error.

fn get_document(&mut self) -> Handle

Get a handle to the Document node.

fn elem_name(&self, target: &Handle) -> QName

What is the name of this element? Read more

fn create_element(&mut self, name: QName, attrs: Vec<Attribute>) -> Handle

Create an element.

fn create_comment(&mut self, text: StrTendril) -> Handle

Create a comment node.

fn create_pi(&mut self, target: StrTendril, data: StrTendril) -> Handle

Create a Processing Instruction node.

fn append(&mut self, parent: Handle, child: NodeOrText<Handle>)

Append a node as the last child of the given node. If this would produce adjacent sibling text nodes, it should concatenate the text instead. Read more

fn append_doctype_to_document(&mut self, name: StrTendril, public_id: StrTendril, system_id: StrTendril)

Append a DOCTYPE element to the Document node.

fn mark_script_already_started(&mut self, _node: Self::Handle)

Mark a HTML <script> as "already started".

fn complete_script(&mut self, _node: Self::Handle) -> NextParserState

Indicate that a script element is complete.

impl Default for RcDom
[src]

fn default() -> RcDom

Returns the "default value" for a type. Read more

impl ParseResult for RcDom
[src]

type Sink = RcDom

Type of consumer of tree modifications. It also extends Default for convenience. Read more

fn get_result(sink: RcDom) -> RcDom

Returns parsed tree data type