Struct libxml::xpath::Context [−][src]
pub struct Context { /* fields omitted */ }
An XPath context
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 as_ptr(&self) -> xmlXPathContextPtr
[src]
pub fn as_ptr(&self) -> xmlXPathContextPtr
Returns the raw libxml2 context pointer behind the struct
pub fn from_node(node: &Node) -> Result<Context, ()>
[src]
pub fn from_node(node: &Node) -> Result<Context, ()>
Instantiate a new Context for the Document of a given Node.
Note: the Context is root-level for that document, use .set_context_node
to limit scope to this node
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 node_evaluate(&self, xpath: &str, node: &Node) -> Result<Object, ()>
[src]
pub fn node_evaluate(&self, xpath: &str, node: &Node) -> Result<Object, ()>
evaluate an xpath on a context Node
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