Struct vtd_xml::VtdNav [] [src]

pub struct VtdNav {
    pub vtd_nav: *mut VTDNav,
    pub to_vtd: Vec<UCSChar>,
    pub from_vtd: String,
    // some fields omitted
}

A cursor into the parsed XML document.

Fields

Methods

impl VtdNav
[src]

Gets the document from the VtdGen, leaving the latter empty and ready to parse another one.

Retrieve a string under the cursor.

The string is cooked raw, meaning that "built-in entity and char references not resolved; entities and char references not expanded".

Navigate the cursor to the first element in the given direction.

Navigate the cursor to the first element in the given direction that matches the tag name.

Navigate the cursor up.

Navigate the cursor to the first child that matches the tag name.

Navigate the cursor to the next sibling that matches the tag name.

Navigate back to the root element.

Iterator over the children nodes having the given tag name.

NB: Creating an iterator is a rather costly operation, TBH. We have to allocate a new VTDNav in order for the iterator not to hold a &mut reference to the original VtdNav cursor. On the other hand, while using the iterator we don't have to recode the tag on every cycle.

Contents of the given attribute value.

Returned string is cooked raw, meaning that "built-in entity and char references not resolved; entities and char references not expanded".

  • attr - The name of the attribute to retrieve.

The chunk of text from inside the current tag.

The current cursor position.

Move the cursor to the given position.

Trait Implementations

impl Display for VtdNav
[src]

Invokes toString on the cursor.

Formats the value using the given formatter. Read more

impl Drop for VtdNav
[src]

A method called when the value goes out of scope. Read more