English | česky | Nederlands | Français | Español | По-русски | >> Deutsch << | 中文 | Italiano | Polski ZVON > Tutorials > XPath Tutorial
>> Beispiel 5 << | Vorheriges | Nächstes

Attribute werden mittels eines @ Präfixes spezifiziert.
 
//@id
Wähle alle "id" Attribute aus

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Öffne das Beispiel in XLab. | Baumansicht (JPG)
 
//BBB[@id]
Wähle jene BBB Elemente aus, die ein Attribut "id" haben

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Öffne das Beispiel in XLab. | Baumansicht (JPG)
 
//BBB[@name]
Wähle jene BBB Elemente aus, die das Attribut "name" enthalten

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Öffne das Beispiel in XLab. | Baumansicht (JPG)
 
//BBB[@*]
Wähle jene BBB Elemente aus, die ein beliebiges Attribut haben

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Öffne das Beispiel in XLab. | Baumansicht (JPG)
 
//BBB[not(@*)]
Wähle jene BBB Elemente aus, die kein Attribut haben

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Öffne das Beispiel in XLab. | Baumansicht (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
answering service water softener MSN Alojamiento Web UNLIMITED Web Hosting by HostDepartment
VoIP Internettelefonie Hosted Exchange, SDSL VoIP Internettelefonie AT VoIP Internettelefonie DE