Struct libxml::xpath::Context [−][src]
pub struct Context { pub context_ptr: xmlXPathContextPtr, // some fields omitted }
The xpath context
Fields
context_ptr: xmlXPathContextPtr
libxml's ContextPtr
Methods
impl Context
[src]
impl Context
pub fn new(doc: &Document) -> Result<Context, ()>
[src]
pub fn new(doc: &Document) -> Result<Context, ()>
create the xpath context for a document
pub fn register_namespace(&self, prefix: &str, href: &str) -> Result<(), ()>
[src]
pub fn register_namespace(&self, prefix: &str, href: &str) -> Result<(), ()>
Register a namespace prefix-href pair on the xpath context
pub fn evaluate(&self, xpath: &str) -> Result<Object, ()>
[src]
pub fn evaluate(&self, xpath: &str) -> Result<Object, ()>
evaluate an xpath
pub fn set_context_node(&mut self, node: &Node) -> Result<(), ()>
[src]
pub fn set_context_node(&mut self, node: &Node) -> Result<(), ()>
localize xpath context to a specific Node
pub fn findnodes(
&mut self,
xpath: &str,
node_opt: Option<&Node>
) -> Result<Vec<Node>, ()>
[src]
pub fn findnodes(
&mut self,
xpath: &str,
node_opt: Option<&Node>
) -> Result<Vec<Node>, ()>
find nodes via xpath, at a specified node or the document root
pub fn findvalue(
&mut self,
xpath: &str,
node_opt: Option<&Node>
) -> Result<String, ()>
[src]
pub fn findvalue(
&mut self,
xpath: &str,
node_opt: Option<&Node>
) -> Result<String, ()>
find a literal value via xpath, at a specified node or the document root
Trait Implementations
impl Clone for Context
[src]
impl Clone for Context
fn clone(&self) -> Context
[src]
fn clone(&self) -> Context
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Drop for Context
[src]
impl Drop for Context