|
Public Types |
enum | {
e_no_error,
e_error_syntax,
e_error_overflow,
e_error_execution,
e_error_stack
} |
Public Member Functions |
| xpath_processor (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr) |
| Constructor.
|
virtual | ~xpath_processor () |
expression_result | er_compute_xpath () |
| Compute an XPath expression.
|
TIXML_STRING | S_compute_xpath () |
| Compute an XPath expression and return the result as a string.
|
int | i_compute_xpath () |
| Compute an XPath expression and return the result as an integer.
|
bool | o_compute_xpath () |
double | d_compute_xpath () |
unsigned | u_compute_xpath_node_set () |
| Compute an XPath expression, and return the number of nodes in the resulting node set.
|
void | v_get_xpath_base (unsigned u_order, const TiXmlBase *&XBp_res, bool &o_attribute) |
| Get one of the XML nodes from the resulting node set. Can only be used after a call to u_compute_xpath_node_set.
|
TiXmlNode * | XNp_get_xpath_node (unsigned u_order) |
| Retrieves an XPath node from the node set. This assumes you know it's not an attribute.
|
TiXmlAttribute * | XAp_get_xpath_attribute (unsigned u_order) |
| Retrieves an XPath attribute from the node set. This assumes you know it's an attribute.
|
Public Attributes |
enum TinyXPath::xpath_processor:: { ... } | e_error |
Protected Member Functions |
virtual void | v_action (xpath_construct, unsigned, unsigned, const char *) |
| Callback from the XPath decoder : a rule has to be applied.
|
virtual int | i_get_action_counter () |
| Internal use. Retrieves the current action counter.
|
void | v_execute_stack () |
| Internal use. Executes the XPath expression. The executions starts at the end of the as_action_store list.
|
void | v_pop_one_action (xpath_construct &xc_action, unsigned &u_sub, unsigned &u_ref, TIXML_STRING &S_literal) |
| Retrieves one quadruplet from the action placeholder.
|
void | v_execute_one (xpath_construct xc_rule, bool o_skip_only) |
| Executes one XPath rule.
|
void | v_execute_absolute_path (unsigned u_action_position, bool o_with_rel, bool o_everywhere) |
| Execute a full set of absolute/relative/relative/.. computation.
|
void | v_execute_step (int &i_relative_action, bool o_skip_only) |
| One step execution.
|
bool | o_check_predicate (const TiXmlElement *XEp_child, bool o_by_name) |
| Spec extract :
A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean.
|
void | v_execute_function (TIXML_STRING &S_name, unsigned u_nb_arg, expression_result **erpp_arg) |
| Execute an XPath function.
|
void | v_function_ceiling (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath ceiling function.
|
void | v_function_concat (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath concat function.
|
void | v_function_contains (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath contains function.
|
void | v_function_count (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath count function.
|
void | v_function_false (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath false function.
|
void | v_function_floor (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath floor function.
|
void | v_function_last (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath last function.
|
void | v_function_name (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath name function.
|
void | v_function_normalize_space (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath normalize-space function.
|
void | v_function_not (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath not function.
|
void | v_function_position (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath position function.
|
void | v_function_starts_with (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath starts-with function.
|
void | v_function_string_length (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath sttring-length function.
|
void | v_function_substring (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath substring function
Standard excerpt:
The substring function returns the substring of the first argument starting at the position specified in the second argument with length specified in the third argument.
|
void | v_function_sum (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath sum function
Standard exerpt :
The sum function returns the sum, for each node in the argument node-set, of the result of converting the string-values of the node to a number.
|
void | v_function_text (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath text function.
|
void | v_function_true (unsigned u_nb_arg, expression_result **erpp_arg) |
| XPath true function.
|
void | v_function_equal (expression_result **erpp_arg) |
| This function is for internal use : evaluation of an equality expression
Standard excerpt :
.
|
void | v_function_not_equal (expression_result **erpp_arg) |
| This function is for internal use : evaluation of a non-equality expression.
|
void | v_function_equal_node_and_other (expression_result *erp_node, expression_result *erp_non) |
| Utility function that evaluates the equality between a node set and a non-node set
.
|
void | v_function_equal_2_node (expression_result *erp_node_set_, expression_result *erp_node_set_2) |
void | v_function_union (node_set &ns_1, node_set &ns_2) |
| Union function.
|
void | v_function_minus (expression_result **erpp_arg) |
| XPath - function.
|
void | v_function_plus (expression_result **erpp_arg) |
| XPath + function.
|
void | v_function_or (expression_result **erpp_arg) |
| XPath or function.
|
void | v_function_and (expression_result **erpp_arg) |
| XPath and function.
|
void | v_function_relational (expression_result **erpp_arg, unsigned u_sub) |
| XPath relational comparison function.
|
void | v_function_opposite () |
| This function, because it only operates on one argument retrieves it himself from the stack
It computes the mathematical opposite.
|
void | v_function_mult (expression_result **erpp_arg, unsigned u_sub) |
| XPath * function (arithmetic).
|
void | v_order_tree () |
| flag that says if the tree has been ordered already.
|
void | v_order_recurs (TiXmlNode *Np_base, int &i_current) |
| Recursive ordering of an XML tree according to XPath's document order.
|
void | v_push_int (int i_val, const char *cp_comment="") |
void | v_push_string (TIXML_STRING S_val) |
void | v_push_bool (bool o_val) |
void | v_push_double (double d_val) |
void | v_push_node_set (node_set *nsp_val) |
bool | o_pop_bool () |
int | i_pop_int () |
TIXML_STRING | S_pop_string () |
node_set | ns_pop_node_set () |
void | v_set_context (const TiXmlElement *XEp_in, bool o_by_name) |
| Set the current context node for predicate evaluations.
|
const TiXmlElement * | XEp_get_context () |
void | v_build_root () |
void | v_remove_root () |
| Remove our fake root, and restore the original relationships of the node given to us as argument.
|
Protected Attributes |
xpath_stack | xs_stack |
action_store | as_action_store |
TiXmlElement * | XEp_root |
| Root, above the XML tree given as parameter to the xpath_processor object.
|
const TiXmlElement * | XEp_context |
| Current context.
|
expression_result | er_result |
| The result of the XPath evaluation, for further node retrieving by v_get_xpath_base.
|
bool | o_is_context_by_name |
const TiXmlNode * | XNp_caller_parent |
const TiXmlNode * | XNp_caller_prev |
const TiXmlNode * | XNp_caller_next |
const TiXmlNode * | XNp_base |