`
SariyaLee
  • 浏览: 149524 次
  • 性别: Icon_minigender_2
  • 来自: 杭州
社区版块
存档分类
最新评论

xpath手册

阅读更多

 

XPath手册 [源于ZVON]

基本的XPath语法类似于在一个文件系统中定位文件,如果路径以斜线 / 开始, 那么该路径就表示到一个元素的绝对路径
/AAA
选择根元素AAA

     <AAA
          <BBB/> 
          <CCC/> 
          <BBB/> 
          <BBB/> 
          <DDD
               <BBB/> 
          </DDD
          <CCC/> 
     </AAA>
/AAA/CCC
选择AAA的所有CCC子元素

     <AAA
          <BBB/> 
          <CCC/> 
          <BBB/> 
          <BBB/> 
          <DDD
               <BBB/> 
          </DDD
          <CCC/> 
     </AAA>
/AAA/DDD/BBB
选择AAA的子元素DDD的所有子元素

     <AAA
          <BBB/> 
          <CCC/> 
          <BBB/> 
          <BBB/> 
          <DDD
               <BBB/> 
          </DDD
          <CCC/> 
     </AAA>
如果路径以双斜线 // 开头, 则表示选择文档中所有满足双斜线//之后规则的元素(无论层级关系)
//BBB
选择所有BBB元素

     <AAA
          <BBB/> 
          <CCC/> 
          <BBB/> 
          <DDD
               <BBB/> 
          </DDD
          <CCC
               <DDD
                    <BBB/> 
                    <BBB/> 
               </DDD
          </CCC
     </AAA>
//DDD/BBB
选择所有父元素是DDD的BBB元素

     <AAA
          <BBB/> 
          <CCC/> 
          <BBB/> 
          <DDD
               <BBB/> 
          </DDD
          <CCC
               <DDD
                    <BBB/> 
                    <BBB/> 
               </DDD
          </CCC
     </AAA>
星号 * 表示选择所有由星号之前的路径所定位的元素
/AAA/CCC/DDD/*
选择所有路径依附于/AAA/CCC/DDD的元素

     <AAA
          <XXX
               <DDD
                    <BBB/> 
                    <BBB/> 
                    <EEE/> 
                    <FFF/> 
               </DDD
          </XXX
          <CCC
               <DDD
                    <BBB/> 
                    <BBB/> 
                    <EEE/> 
                    <FFF/> 
               </DDD
          </CCC
          <CCC
               <BBB
                    <BBB
                         <BBB/> 
                    </BBB
               </BBB
          </CCC
     </AAA>
/*/*/*/BBB
选择所有的有3个祖先元素的BBB元素

     <AAA
          <XXX
               <DDD
                    <BBB/> 
                    <BBB/> 
                    <EEE/> 
                    <FFF/> 
               </DDD
          </XXX
          <CCC
               <DDD
                    <BBB/> 
                    <BBB/> 
                    <EEE/> 
                    <FFF/> 
               </DDD
          </CCC
          <CCC
               <BBB
                    <BBB
                         <BBB/> 
                    </BBB
               </BBB
          </CCC
     </AAA>
//*
选择所有元素

     <AAA
          <XXX
               <DDD
                    <BBB/> 
                    <BBB/> 
                    <EEE/> 
                    <FFF/> 
               </DDD
          </XXX
          <CCC
               <DDD
                    <BBB/> 
                    <BBB/> 
                    <EEE/> 
                    <FFF/> 
               </DDD
          </CCC
          <CCC
               <BBB
                    <BBB
                         <BBB/> 
                    </BBB
               </BBB
          </CCC
     </AAA>
方块号里的表达式可以进一步的指定元素, 其中数字表示元素在选择集里的位置, 而last()函数则表示选择集中的最后一个元素.
/AAA/BBB[1]
选择AAA的第一个BBB子元素

     <AAA
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
     </AAA>
/AAA/BBB[last()]
选择AAA的最后一个BBB子元素

     <AAA
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
     </AAA>
//@id
选择所有的id属性

     <AAA
          <BBB id = "b1"/> 
          <BBB id = "b2"/> 
          <BBB name = "bbb"/> 
          <BBB/> 
     </AAA>
//BBB[@id]
选择有id属性的BBB元素

     <AAA
          <BBB id = "b1"/> 
          <BBB id = "b2"/> 
          <BBB name = "bbb"/> 
          <BBB/> 
     </AAA>
//BBB[@name]
选择有name属性的BBB元素

     <AAA
          <BBB id = "b1"/> 
          <BBB id = "b2"/> 
          <BBB name = "bbb"/> 
          <BBB/> 
     </AAA>
//BBB[@*]
选择有任意属性的BBB元素

     <AAA
          <BBB id = "b1"/> 
          <BBB id = "b2"/> 
          <BBB name = "bbb"/> 
          <BBB/> 
     </AAA>
//BBB[not(@*)]
选择没有属性的BBB元素

     <AAA
          <BBB id = "b1"/> 
          <BBB id = "b2"/> 
          <BBB name = "bbb"/> 
          <BBB/> 
     </AAA>
属性的值可以被用来作为选择的准则, normalize-space函数删除了前部和尾部的空格, 并且把连续的空格串替换为一个单一的空格
//BBB[@id='b1']
选择含有属性id且其值为'b1'的BBB元素

     <AAA
          <BBB id = "b1"/> 
          <BBB name = " bbb "/> 
          <BBB name = "bbb"/> 
     </AAA>
//BBB[@name='bbb']
选择含有属性name且其值为'bbb'的BBB元素

     <AAA
          <BBB id = "b1"/> 
          <BBB name = " bbb "/> 
          <BBB name = "bbb"/> 
     </AAA>
//BBB[normalize-space(@name)='bbb']
选择含有属性name且其值(在用normalize-space函数去掉前后空格后)为'bbb'的BBB元素

     <AAA
          <BBB id = "b1"/> 
          <BBB name = " bbb "/> 
          <BBB name = "bbb"/> 
     </AAA>
count()函数可以计数所选元素的个数
//*[count(BBB)=2]
选择含有2个BBB子元素的元素

     <AAA
          <CCC
               <BBB/> 
               <BBB/> 
               <BBB/> 
          </CCC
          <DDD
               <BBB/> 
               <BBB/> 
          </DDD
          <EEE
               <CCC/> 
               <DDD/> 
          </EEE
     </AAA>
//*[count(*)=2]
选择含有2个子元素的元素

     <AAA
          <CCC
               <BBB/> 
               <BBB/> 
               <BBB/> 
          </CCC
          <DDD
               <BBB/> 
               <BBB/> 
          </DDD
          <EEE
               <CCC/> 
               <DDD/> 
          </EEE
     </AAA>
//*[count(*)=3]
选择含有3个子元素的元素

     <AAA
          <CCC
               <BBB/> 
               <BBB/> 
               <BBB/> 
          </CCC
          <DDD
               <BBB/> 
               <BBB/> 
          </DDD
          <EEE
               <CCC/> 
               <DDD/> 
          </EEE
     </AAA>
name()函数返回元素的名称, start-with()函数在该函数的第一个参数字符串是以第二个参数字符开始的情况返回true, contains()函数当其第一个字符串参数包含有第二个字符串参数时返回true.
//*[name()='BBB']
选择所有名称为BBB的元素(这里等价于//BBB)

     <AAA
          <BCC
               <BBB/> 
               <BBB/> 
               <BBB/> 
          </BCC
          <DDB
               <BBB/> 
               <BBB/> 
          </DDB
          <BEC
               <CCC/> 
               <DBD/> 
          </BEC
     </AAA>
//*[starts-with(name(),'B')]
选择所有名称以"B"起始的元素

     <AAA
          <BCC
               <BBB/> 
               <BBB/> 
               <BBB/> 
          </BCC
          <DDB
               <BBB/> 
               <BBB/> 
          </DDB
          <BEC
               <CCC/> 
               <DBD/> 
          </BEC
     </AAA>
//*[contains(name(),'C')]
选择所有名称包含"C"的元素

     <AAA
          <BCC
               <BBB/> 
               <BBB/> 
               <BBB/> 
          </BCC
          <DDB
               <BBB/> 
               <BBB/> 
          </DDB
          <BEC
               <CCC/> 
               <DBD/> 
          </BEC
     </AAA>
string-length函数返回字符串的字符数,你应该用&lt;替代<, 用&gt;代替>
//*[string-length(name()) = 3]
选择名字长度为3的元素

     <AAA
          <Q/> 
          <SSSS/> 
          <BB/> 
          <CCC/> 
          <DDDDDDDD/> 
          <EEEE/> 
     </AAA>
//*[string-length(name()) < 3]
选择名字长度小于3的元素

     <AAA
          <Q/> 
          <SSSS/> 
          <BB/> 
          <CCC/> 
          <DDDDDDDD/> 
          <EEEE/> 
     </AAA>
//*[string-length(name()) > 3]
选择名字长度大于3的元素

     <AAA
          <Q/> 
          <SSSS/> 
          <BB/> 
          <CCC/> 
          <DDDDDDDD/> 
          <EEEE/> 
     </AAA>
多个路径可以用分隔符 | 合并在一起
//CCC | //BBB
选择所有的CCC和BBB元素

     <AAA
          <BBB/> 
          <CCC/> 
          <DDD
               <CCC/> 
          </DDD
          <EEE/> 
     </AAA>
/AAA/EEE | //BBB
选择所有的BBB元素和所有是AAA的子元素的EEE元素

     <AAA
          <BBB/> 
          <CCC/> 
          <DDD
               <CCC/> 
          </DDD
          <EEE/> 
     </AAA>
/AAA/EEE | //DDD/CCC | /AAA | //BBB
可以合并的路径数目没有限制

     <AAA
          <BBB/> 
          <CCC/> 
          <DDD
               <CCC/> 
          </DDD
          <EEE/> 
     </AAA>
child轴(axis)包含上下文节点的子元素, 作为默认的轴,可以忽略不写.
/AAA
等价于 /child::AAA

     <AAA
          <BBB/> 
          <CCC/> 
     </AAA>
/child::AAA
等价于/AAA

     <AAA
          <BBB/> 
          <CCC/> 
     </AAA>
/AAA/BBB
等价于/child::AAA/child::BBB

     <AAA
          <BBB/> 
          <CCC/> 
     </AAA>
/child::AAA/child::BBB
等价于/AAA/BBB

     <AAA
          <BBB/> 
          <CCC/> 
     </AAA>
/child::AAA/BBB
二者都可以被合并

     <AAA
          <BBB/> 
          <CCC/> 
     </AAA>
descendant (后代)轴包含上下文节点的后代,一个后代是指子节点或者子节点的子节点等等, 因此descendant轴不会包含属性和命名空间节点.
/descendant::*
选择文档根元素的所有后代.即所有的元素被选择

     <AAA
          <BBB
               <DDD
                    <CCC
                         <DDD/> 
                         <EEE/> 
                    </CCC
               </DDD
          </BBB
          <CCC
               <DDD
                    <EEE
                         <DDD
                              <FFF/> 
                         </DDD
                    </EEE
               </DDD
          </CCC
     </AAA>
/AAA/BBB/descendant::*
选择/AAA/BBB的所有后代元素

     <AAA
          <BBB
               <DDD
                    <CCC
                         <DDD/> 
                         <EEE/> 
                    </CCC
               </DDD
          </BBB
          <CCC
               <DDD
                    <EEE
                         <DDD
                              <FFF/> 
                         </DDD
                    </EEE
               </DDD
          </CCC
     </AAA>
//CCC/descendant::*
选择在祖先元素中有CCC的所有元素

     <AAA
          <BBB
               <DDD
                    <CCC
                         <DDD/> 
                         <EEE/> 
                    </CCC
               </DDD
          </BBB
          <CCC
               <DDD
                    <EEE
                         <DDD
                              <FFF/> 
                         </DDD
                    </EEE
               </DDD
          </CCC
     </AAA>
//CCC/descendant::DDD
选择所有以CCC为祖先元素的DDD元素

     <AAA
          <BBB
               <DDD
                    <CCC
                         <DDD/> 
                         <EEE/> 
                    </CCC
               </DDD
          </BBB
          <CCC
               <DDD
                    <EEE
                         <DDD
                              <FFF/> 
                         </DDD
                    </EEE
               </DDD
          </CCC
     </AAA>
parent轴(axis)包含上下文节点的父节点, 如果有父节点的话
//DDD/parent::*
选择DDD元素的所有父节点

     <AAA
          <BBB
               <DDD
                    <CCC
                         <DDD/> 
                         <EEE/> 
                    </CCC
               </DDD
          </BBB
          <CCC
               <DDD
                    <EEE
                         <DDD
                              <FFF/> 
                         </DDD
                    </EEE
               </DDD
          </CCC
     </AAA>
ancestor轴(axis)包含上下节点的祖先节点, 该祖先节点由其上下文节点的父节点以及父节点的父节点等等诸如此类的节点构成,所以ancestor轴总是包含有根节点,除非上下文节点就是根节点本身.
/AAA/BBB/DDD/CCC/EEE/ancestor::*
选择一个绝对路径上的所有节点

     <AAA
          <BBB
               <DDD
                    <CCC
                         <DDD/> 
                         <EEE/> 
                    </CCC
               </DDD
          </BBB
          <CCC
               <DDD
                    <EEE
                         <DDD
                              <FFF/> 
                         </DDD
                    </EEE
               </DDD
          </CCC
     </AAA>
//FFF/ancestor::*
选择FFF元素的祖先节点

     <AAA
          <BBB
               <DDD
                    <CCC
                         <DDD/> 
                         <EEE/> 
                    </CCC
               </DDD
          </BBB
          <CCC
               <DDD
                    <EEE
                         <DDD
                              <FFF/> 
                         </DDD
                    </EEE
               </DDD
          </CCC
     </AAA>
following-sibling轴(axis)包含上下文节点之后的所有兄弟节点
/AAA/BBB/following-sibling::*
 

     <AAA
          <BBB
               <CCC/> 
               <DDD/> 
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <DDD/> 
                    <CCC/> 
                    <FFF/> 
                    <FFF
                         <GGG/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
//CCC/following-sibling::*
 

     <AAA
          <BBB
               <CCC/> 
               <DDD/> 
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <DDD/> 
                    <CCC/> 
                    <FFF/> 
                    <FFF
                         <GGG/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
preceding-sibling 轴(axis)包含上下文节点之前的所有兄弟节点
/AAA/XXX/preceding-sibling::*
 

     <AAA
          <BBB
               <CCC/> 
               <DDD/> 
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <DDD/> 
                    <CCC/> 
                    <FFF/> 
                    <FFF
                         <GGG/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
//CCC/preceding-sibling::*
 

     <AAA
          <BBB
               <CCC/> 
               <DDD/> 
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <DDD/> 
                    <CCC/> 
                    <FFF/> 
                    <FFF
                         <GGG/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
following轴(axis)包含同一文档中按文档顺序位于上下文节点之后的所有节点, 除了祖先节点,属性节点和命名空间节点
/AAA/XXX/following::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ
                    <DDD/> 
                    <DDD
                         <EEE/> 
                    </DDD
               </ZZZ
               <FFF
                    <GGG/> 
               </FFF
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <DDD/> 
                    <CCC/> 
                    <FFF/> 
                    <FFF
                         <GGG/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
//ZZZ/following::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ
                    <DDD/> 
                    <DDD
                         <EEE/> 
                    </DDD
               </ZZZ
               <FFF
                    <GGG/> 
               </FFF
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <DDD/> 
                    <CCC/> 
                    <FFF/> 
                    <FFF
                         <GGG/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
following轴(axis)包含同一文档中按文档顺序位于上下文节点之前的所有节点, 除了祖先节点,属性节点和命名空间节点
/AAA/XXX/preceding::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ
                    <DDD/> 
               </ZZZ
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <DDD/> 
                    <CCC/> 
                    <FFF/> 
                    <FFF
                         <GGG/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
//GGG/preceding::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ
                    <DDD/> 
               </ZZZ
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <DDD/> 
                    <CCC/> 
                    <FFF/> 
                    <FFF
                         <GGG/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
descendant-or-self 轴(axis)包含上下文节点本身和该节点的后代节点
/AAA/XXX/descendant-or-self::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ
                    <DDD/> 
               </ZZZ
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <DDD/> 
                    <CCC/> 
                    <FFF/> 
                    <FFF
                         <GGG/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
//CCC/descendant-or-self::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ
                    <DDD/> 
               </ZZZ
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <DDD/> 
                    <CCC/> 
                    <FFF/> 
                    <FFF
                         <GGG/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
ancestor-or-self 轴(axis)包含上下文节点本身和该节点的祖先节点
/AAA/XXX/DDD/EEE/ancestor-or-self::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ
                    <DDD/> 
               </ZZZ
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <DDD/> 
                    <CCC/> 
                    <FFF/> 
                    <FFF
                         <GGG/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
//GGG/ancestor-or-self::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ
                    <DDD/> 
               </ZZZ
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <DDD/> 
                    <CCC/> 
                    <FFF/> 
                    <FFF
                         <GGG/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
ancestor, descendant, following, preceding 和self轴(axis)分割了XML文档(忽略属性节点和命名空间节点), 不能交迭, 而一起使用则包含所有节点
//GGG/ancestor::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ/> 
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <FFF
                         <HHH/> 
                         <GGG
                              <JJJ
                                   <QQQ/> 
                              </JJJ
                              <JJJ/> 
                         </GGG
                         <HHH/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
//GGG/descendant::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ/> 
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <FFF
                         <HHH/> 
                         <GGG
                              <JJJ
                                   <QQQ/> 
                              </JJJ
                              <JJJ/> 
                         </GGG
                         <HHH/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
//GGG/following::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ/> 
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <FFF
                         <HHH/> 
                         <GGG
                              <JJJ
                                   <QQQ/> 
                              </JJJ
                              <JJJ/> 
                         </GGG
                         <HHH/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
//GGG/preceding::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ/> 
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <FFF
                         <HHH/> 
                         <GGG
                              <JJJ
                                   <QQQ/> 
                              </JJJ
                              <JJJ/> 
                         </GGG
                         <HHH/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
//GGG/self::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ/> 
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <FFF
                         <HHH/> 
                         <GGG
                              <JJJ
                                   <QQQ/> 
                              </JJJ
                              <JJJ/> 
                         </GGG
                         <HHH/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
//GGG/ancestor::* | //GGG/descendant::* | //GGG/following::* | //GGG/preceding::* | //GGG/self::*
 

     <AAA
          <BBB
               <CCC/> 
               <ZZZ/> 
          </BBB
          <XXX
               <DDD
                    <EEE/> 
                    <FFF
                         <HHH/> 
                         <GGG
                              <JJJ
                                   <QQQ/> 
                              </JJJ
                              <JJJ/> 
                         </GGG
                         <HHH/> 
                    </FFF
               </DDD
          </XXX
          <CCC
               <DDD/> 
          </CCC
     </AAA>
div运算符做浮点除法运算, mod运算符做求余运算, floor函数返回不大于参数的最大整数(趋近于正无穷), ceiling返回不小于参数的最小整数(趋近于负无穷)
//BBB[position() mod 2 = 0 ]
选择偶数位置的BBB元素

     <AAA
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <CCC/> 
          <CCC/> 
          <CCC/> 
     </AAA>
//BBB[ position() = floor(last() div 2 + 0.5) or position() = ceiling(last() div 2 + 0.5) ]
选择中间的BBB元素

     <AAA
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <CCC/> 
          <CCC/> 
          <CCC/> 
     </AAA>
//CCC[ position() = floor(last() div 2 + 0.5) or position() = ceiling(last() div 2 + 0.5) ]
选择中间的CCC元素

     <AAA
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <BBB/> 
          <CCC/> 
          <CCC/> 
          <CCC/> 
     </AAA>
分享到:
评论

相关推荐

    XPath手册.chm

    从w3school下载。自己制作的一个xpath手册。csdn有个兄弟发布了一个,5分的,打开都看不到。于是自己做了一个,希望大家能喜欢。

    XPath.chm参考手册

    XPath.chm参考手册应该包含了XPath的详细语法、函数、轴、示例等内容,对于理解和使用XPath进行XML处理非常有帮助。通过学习这本手册,开发者可以更好地掌握XPath,从而在处理XML数据时更加高效和精准。

    XPath依赖Jar包

    XPath手册通常会包含更多详细的信息,比如XPath的完整语法、函数库的使用、命名空间的处理方法,以及各种复杂查询的实例,这对于初学者来说是非常有价值的参考资料。通过深入学习和实践,开发者可以熟练地利用XPath...

    XPath详细参考手册

    Xpath开发详细中文参考手册,帮助你快速查阅XPath语法

    传个XPATH的参考手册,这个是别的网站COPY下来的!

    XPath,全称XML Path Language,是一种在XML文档中查找信息的语言。它被设计用来选取XML文档中的节点,如元素、...通过阅读《XPath手册》提供的详细信息,读者可以深入理解XPath的各个方面,并将其应用于实际开发中。

    第31章 XPath1

    对于更深入的XPath知识,建议查阅XPath手册或XML DOM文档。 由于各浏览器对XPath的支持程度不同,开发跨浏览器的应用时需要注意兼容性问题。在非IE浏览器中,通常使用`document.evaluate()`方法来执行XPath查询,这...

    XPath参考手册.zip

    XPath即为XML路径语言,它是一种用来确定XML(标准通用标记语言的子集)文档中某部分位置的语言。XPath基于XML的树状结构,提供在数据结构树中找寻节点的能力。起初 XPath 的提出的初衷是将其作为一个通用的、介于...

    XPATH参考手册

    "XPath参考手册" XPath 是一门在 XML 文档中查找信息的语言,XPath 可用来在 XML 文档中对元素和属性进行遍历。XPath 是 W3C XSLT 标准的主要元素,并且 XQuery 和 XPointer 同时被构建于 XPath 表达之上。因此,对...

    参考手册xpath

    学习XPath时,可以参考W3CSchool提供的XPath2.0、XQuery1.0和XSLT2.0的内置函数参考手册。通过使用实例文档(如"books.xml")进行实践,可以加深对XPath语法和表达式的理解。通过实例的展示,学习者可以掌握如何利用...

    XPath官方手册中文版

    XPath官方手册中文版,内容介绍的很全面,将xpath相关的基础如xml等介绍得很好,比较适合初学者

    xpath 依赖包及开发手册

    在这个“xpath 依赖包及开发手册”中,我们主要关注XPath的使用,以及相关的jar包和开发工具。 首先,`jaxen-1.1.2-stable.jar`是一个关键的依赖包,它是XPath实现的一部分。Jaxen是一个Java库,提供了一个统一的...

    XPath CHM 手册

    XPath参考手册,详细的介绍了XPath、XQuery 以及 XSLT函数。

    XPath参考手册中文CHM版最新版本

    本文给大家带来XPath参考手册,需要的可以参考下! XPath 路径表达式 XPath 使用路径表达式来选取 XML 文档中的节点或者节点集。这些路径表达式和我们在常规的电脑文件系统中看到的表达式非常相似。 XPath 标准...

    xpath使用手册

    归纳整理的xpath使用手册,在自动化工作中,xpath使用很频繁。

    XPath 教程(XPath Tutorial)多国语言帮助手册.rar

    在提供的压缩包中,除了XPath教程外,还有“XmlSchema标准参考手册”,这将帮助读者理解XML Schema,它是XML文档的结构定义语言,用于约束XML实例的结构和数据类型。jb51.net.txt可能是网站链接或其他相关信息,而...

    XPath 工具手册(语法、轴、函数等)

    XPath的工具性手册,非教程,适合对于XPath有初步了解,但对其中的全部功能不是很清楚的人。本人从网上搜集资料,整理而成,以分享。

    XPath学习手册

    详尽描述XPath的各种使用方法。让xml操作更简单。

    xml 学习帮助,幻灯片及帮助文档

    "XPath手册.chm" 提到了XPath,它是XML的一个子语言,用于在XML文档中查找信息。XPath通过路径表达式来选取XML节点,如元素、属性、文本等。理解XPath对于高效地操作XML文档至关重要,因为它允许你在无需了解整个...

Global site tag (gtag.js) - Google Analytics