Struct sxd_xpath::XPath [] [src]

pub struct XPath(_);

A compiled XPath. Construct via Factory.

Methods

impl XPath
[src]

Evaluate this expression in the given context.

Examples

The most common case is to pass in a reference to a Context:

extern crate sxd_document;
extern crate sxd_xpath;

use sxd_document::dom::Document;
use sxd_xpath::{XPath, Context};

fn my_evaluate(doc: Document, xpath: XPath) {
    let mut context = Context::new();
    let value = xpath.evaluate(&context, doc.root());
    println!("The result was: {:?}", value);
}

Trait Implementations

impl Debug for XPath
[src]

Formats the value using the given formatter.