Enum exile::Node[][src]

pub enum Node {
    CData(String),
    Comment(String),
    DocType(String),
    Element(Element),
    PI(PI),
    Text(String),
}

Represents a Node in an XML Document. The Document consists of a recursive nesting of these.

Variants

CData(String)

<![CDATA[text]]>

Comment(String)

Comment, e.g. <!--some comment-->

DocType(String)

<!DOCTYPE doc> - not implemented

Element(Element)

<element/>

PI(PI)

Processing Instruction, e.g. <?target data?>

Text(String)

Text data in an element, i.e. <x>hello &lt;</x> where the Text is hello <.

Implementations

impl Node[src]

pub fn write<W>(
    &self,
    writer: &mut W,
    opts: &WriteOpts,
    depth: usize
) -> Result<(), XDocErr> where
    W: Write
[src]

Serialize the XML Document to a Write stream.

pub fn is_text(&self) -> bool[src]

Returns true if this node is either a Node::Text or a Node::CData.

Trait Implementations

impl Clone for Node[src]

impl Debug for Node[src]

impl Default for Node[src]

impl Eq for Node[src]

impl Hash for Node[src]

impl Ord for Node[src]

impl PartialEq<Node> for Node[src]

impl PartialOrd<Node> for Node[src]

impl StructuralEq for Node[src]

impl StructuralPartialEq for Node[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.