Class xpath
Defined in File xpath.hpp
Class Documentation
-
class xpath
Class encapsulating an XPath.
The actual xpath implementation. It expects an xpath in the constructor and this path must be UTF-8 encoded.
Public Functions
-
xpath(std::string_view path)
constructor taking a UTF-8 encoded xpath in path
-
template<typename T>
std::vector<T*> evaluate(const node &root, const context &ctxt = {}) const Evaluate an XPath and return a node_set. If you’re only interested in mxml::element results, you should call the evaluate<element>() instantiation. Use ctxt to provide values for variables.
-
xpath(std::string_view path)