Manages a compiled XPath expression.
More...
#include <element.hpp>
Manages a compiled XPath expression.
etree::XPath::XPath |
( |
const char * |
s | ) |
|
Compile an expression from a character array.
- Parameters
-
etree::XPath::XPath |
( |
const string & |
s | ) |
|
Compile an expression from a STL string.
- Parameters
-
etree::XPath::XPath |
( |
const string & |
s, |
|
|
const XPathContext & |
context |
|
) |
| |
Compile an expression from a STL string.
- Parameters
-
etree::XPath::XPath |
( |
const XPath & |
other | ) |
|
Copy an expression.
- Parameters
-
other | XPath expression to copy. |
Return the first matching Element, if any, matching the expression.
- Parameters
-
e | Root element to search from. |
- Returns
- Matching Element, if any.
std::vector< Element > etree::XPath::findall |
( |
const Element & |
e | ) |
const |
Return all Elements matching the expression.
- Parameters
-
e | Root element to search from. |
- Returns
- Matching Elements.
std::string etree::XPath::findtext |
( |
const Element & |
e, |
|
|
const string & |
default_ = "" |
|
) |
| const |
Return the text part of the first matching element.
- Parameters
-
e | Root element to search from. |
default_ | String to return if text is not found. |
- Returns
- Text part of the first matching element, or the empty string.
XPath & etree::XPath::operator= |
( |
const XPath & |
other | ) |
|
Replace this expression with another.
- Parameters
-
other | XPath expression to assign. |
The documentation for this class was generated from the following files: