Struct treexml::Document [] [src]

pub struct Document {
    pub version: XmlVersion,
    pub encoding: String,
    pub root: Option<Element>,
}

An XML document

Fields

version: XmlVersion

Version of the XML document

encoding: String

Encoding of the XML document

root: Option<Element>

Root tag of the XML document

Methods

impl Document
[src]

fn new() -> Document

Create a new Document with default values

fn parse<R: Read>(r: R) -> Result<DocumentError>

Parse data from a reader to construct an XML document

Failures

Passes any errors that the xml-rs library returns up the stack

Trait Implementations

impl Eq for Document
[src]

impl PartialEq for Document
[src]

fn eq(&self, __arg_0: &Document) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Document) -> bool

This method tests for !=.

impl Clone for Document
[src]

fn clone(&self) -> Document

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Debug for Document
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Default for Document
[src]

fn default() -> Self

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