//@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>
posted on 2006-06-24 10:57  滋心  阅读(576)  评论(0编辑  收藏  举报