From 45f8e353451e468ce961c8dade029366985e3730 Mon Sep 17 00:00:00 2001 From: zhengchun Date: Mon, 25 Mar 2024 20:56:58 +0800 Subject: [PATCH] update README.md --- README.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 203fb33..180ed98 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,9 @@ XPath is Go package provides selecting nodes from XML, HTML or other documents u - `child::*` : The child axis selects children of the current node. + - `child::node()`: Selects all the children of the context node. + - `child::text()`: Selects all text node children of the context node. + - `descendant::*` : The descendant axis selects descendants of the current node. It is equivalent to '//'. - `descendant-or-self::*` : Selects descendants including the current node. @@ -91,21 +94,21 @@ The gxpath supported three types: number, boolean, string. - `a = b` : Standard comparisons. - - a = b True if a equals b. - - a != b True if a is not equal to b. - - a < b True if a is less than b. - - a <= b True if a is less than or equal to b. - - a > b True if a is greater than b. - - a >= b True if a is greater than or equal to b. + - `a = b` : True if a equals b. + - `a != b` : True if a is not equal to b. + - `a < b` : True if a is less than b. + - `a <= b` : True if a is less than or equal to b. + - `a > b` : True if a is greater than b. + - `a >= b` : True if a is greater than or equal to b. - `a + b` : Arithmetic expressions. - `- a` Unary minus - - a + b Add - - a - b Substract - - a \* b Multiply - - a div b Divide - - a mod b Floating point mod, like Java. + - `a + b` : Addition + - `a - b` : Subtraction + - `a * b` : Multiplication + - `a div b` : Division + - `a mod b` : Modulus (division remainder) - `a or b` : Boolean `or` operation.