English | česky | Nederlands | Français | >> Español << | По-русски | Deutsch | 中文 | Italiano | Polski ZVON > Tutorials > XPath Tutorial
>> Ejemplo 5 << | Ant | Prox

Los atributos se especifican con el símbolo prefijo '@'.
 
//@id
Selecciona todos los atributos 'id'

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Abrir el ejemplo en XLab. | Vista arborescente (JPG)
 
//BBB[@id]
Selecciona los elementos BBB que contienen un atributo 'id'

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Abrir el ejemplo en XLab. | Vista arborescente (JPG)
 
//BBB[@name]
Selecciona los elementos BBB que contienen un atributo 'name'

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Abrir el ejemplo en XLab. | Vista arborescente (JPG)
 
//BBB[@*]
Selecciona los elementos BBB que contienen algún atributo

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Abrir el ejemplo en XLab. | Vista arborescente (JPG)
 
//BBB[not(@*)]
Selecciona los elementos BBB que no contienen atributos

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Abrir el ejemplo en XLab. | Vista arborescente (JPG)



_____________________________________________
Reference Search | Sitemap | XML Glossary       ZVON | Systinet




Related sites:
  • dotNet Slackers - Your latest resource for ASP.NET
  • Dotnet Spider - Outsourcing and Offshore software development in India
  • XML - Xselerator, XSL Editor, BizTalk Utilities, XML Tutorials, Learn XML
  • Planet Source Code - The largest public source code database on the Internet
conference call service VoIP Internettelefonie DSL, SDSL, ADSL answering service