ノードのインデックス番号を返す
Elementノード内の1番目のChildノードを返す
//Element/Child[position()=1]
最後のノードのposition値を返す
Elementノード内の最後の子要素ノードを返す
/Element/*[position()=last()]"
ノード数を返す
子要素が無いElementノードを返す
//Element[count(./*)=0]
タグ名を返す
タグ名がPriceのノードを返す
//*[name()='Price']"
文字列値を返す
number属性の値が1のノードを返す
//*[string(@number)='1']"
指定した文字列を含む要素を返す
name属性の値にaを含むElementノードを返す
//Element[contains(@name,'a')]
指定した文字列ではじまる要素を返す
Elementの値がcontentsではじまるElementノードを返す
//Element[starts-with(.,'contents')]
エレメント名がtext1_ではじまるノードを返す
//*[starts-with(name(),'text1_')]
name属性の値がsection1ではじまるElementノードを返す
//Element[starts-with(@name,'section1')]
name属性の値がsection1かsection2ではじまるElementノードを返す
//Element[starts-with(@name,'section1') or starts-with(@name,'section2')]
要素内のテキストを空白/改行を取り除いて返す
idが1の要素内のテキストを空白/改行を取り除いて返す
normalize-space(id('1'))
要素内のテキスト長を返す
idが1の要素内のテキスト長を返す
string-length(id('1'))
空白/改行以外のテキストを100文字以上含むElementノードを返す
//Element[string-length(normalize-space()) > 100]