xmlsq
0.9.0
|
Perform simple and full XPath 1.0 queries on an XML document. More...
Public Types | |
enum | Opts : unsigned int { None = 0x0 , Asciify = 0x1000 , Raw = 0x2000 , Trim = 0x4000 } |
Static Public Member Functions | |
static std::string | GetText (const std::string &xmlFile, const std::string &query, Opts opts=Opts::None) |
Extract text from the first matching XML file node. More... | |
static std::string | FullQuery (const std::string &xmlFile, const std::string &query, Opts opts=Opts::None) |
Perform a full XPath query on the XML input. More... | |
static int | Count (const std::string &xmlFile, const std::string &query) |
Compute the count for the XPath query. More... | |
Perform simple and full XPath 1.0 queries on an XML document.
enum xmlsq::Query::Opts : unsigned int |
|
static |
Compute the count for the XPath query.
xmlFile | Name of XML file or string containing XML data. |
query | XPath 1.0 expression to select a node. This must evaluate to a node or node set. |
count(query)
. std::runtime_error | if missing file or invalid XML or invalid XPath. |
|
static |
Perform a full XPath query on the XML input.
xmlFile | Name of XML file or string containing XML data. |
query | XPath 1.0 expression. |
opts | Formatting options for output. |
std::runtime_error | if missing file or invalid XML or invalid XPath. |
|
static |
Extract text from the first matching XML file node.
xmlFile | Name of XML file or string containing XML data. |
query | XPath 1.0 expression to select a node. This must evaluate to a node or node set. |
opts | Formatting options for output. |
std::runtime_error | if missing file or invalid XML or invalid XPath. |