Skip to main content

evaluate_str

Function evaluate_str 

Source
pub fn evaluate_str(
    xpath: &str,
    xml: &str,
    uri: Option<&URIStr>,
) -> Result<XPathObject, XMLError>
Expand description

Parse xml as the XML document and evaluate xpath as an XPath expression.

If successfully executed, it returns an XPathObject representing the evaluation result of the XPath expression.
If the compilation or evaluation of the XPath expression fails, or if the XML document cannot be parsed, it returns Err.

uri is treated as the base URI for the XML document, and it is recommended to specify it in documents that may retrieve external resources.