XPath

xiaoxiao2021-03-06  157

-------------------------------------------------- ---------------------------- Normalize-Space (@Name) = 'value' removes space not (@ name = 'value') Not

// * [counT (bbb) = 2] // * [count (*) = 2] // * [count (*) = 3]

// * [Name () = 'bbb']

// * [starts-with (name (), 'b')]

/// * [contains (name (), 'c')]]

// * [String-length (name ()) = 3]

// * [String-length (name ()) <3]

// * [String-length (name ())> 3]

---------------------------------------

// CCC | // BBB / AAA / EEE | ​​// BBB / AAA / EEE | ​​// DDD / CCC | / AAA | // BBB

--Child -------------------------------------

/ Aaa equivalent / child :: aaa / aaa / bbb equivalent / child :: aaa / child :: bbb / child :: AAA / BBB can be mixed

--Descendant -------------------------------------

/ descendant :: * Get all children and grandchild nodes / aaa / bb / descendant :: * // ccc / descendant :: DDD

--Parent -------------------------------------

// DDD / PARENT :: *

- Anncestor -------------------------------------

/ AAA / BBB / DDD / CCC / EEE / Ancestor :: * // FFF / AnceStor :: *

- Following-Sibling -------------------------------------

/ AAA / BBB / FOLLOWING-SIBLING :: * // CCC / FOLLOWING-SIBLING: *

--Preceding-Sibling -------------------------------------

/ Aaa / xxx / preceding-sibling :: * // ccc / preceding-sibling :: *

- Following -------------------------------------

/ AAA / XXX / FOLLOWING :: * // ZZZ / FOLLOWING :: *

--Preceding -------------------------------------

/ Aaa / xxx / preceding :: * // GGG / preceding :: *

--Descendant-or-self -------------------------------------

/ Aaa / xxx / descendant-or-self :: * // ccc / descendant-or-self :: *

--Ancestor-or-self -------------------------------------

/ AAA / XXX / DDD / EEE / Ancestor-OR-Self :: * // GGG / AnceStor-OR-Self :: *

---------------------------------------

// GGG / Descendant :: * // GGG / FOLLOWING: * // GGG / PREDING :: * // GGG / Self :: * - position () ----- --------------------------------

Position () coordinate positioning from 1st FLOOR () Cutting CEILING ()

// bbb [position () mod 2 = 0] // bbb [position () = floor (last () Div 2 0.5) or position () = ceiling (Last () Div 2 0.5)] // CCC [ Position () = floor (last () Div 2 0.5) or position () = ceiling (last () Div 2 0.5)]

转载请注明原文地址:https://www.9cbs.com/read-128036.html

New Post(0)