English | česky | Nederlands | Français | Español | По-русски | Deutsch | 中文 | Italiano | >> Polski << ZVON > Tutorials > XPath Tutorial
>> Przykład 5 << | Poprzedni | Następny

Atrybuty określa się przy użyciu prefiksu "@".
 
//@id
Wybiera wszystkie atrybuty id

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Otwórz przykład w XLab | Widok drzewa (JPG)
 
//BBB[@id]
Wybiera elementy BBB posiadające atrybut id

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Otwórz przykład w XLab | Widok drzewa (JPG)
 
//BBB[@name]
Wybiera elementy BBB posiadające atrybut name

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Otwórz przykład w XLab | Widok drzewa (JPG)
 
//BBB[@*]
Wybiera elementy BBB posiadające dowolny atrybut

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Otwórz przykład w XLab | Widok drzewa (JPG)
 
//BBB[not(@*)]
Wybiera elementy BBB nie posiadające ani jednego atrybutu

     <AAA>
          <BBB id = "b1"/>
          <BBB id = "b2"/>
          <BBB name = "bbb"/>
          <BBB/>
     </AAA>
Otwórz przykład w XLab | Widok drzewa (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
Domain Names VoIP Internettelefonie DSL, SDSL, ADSL UNLIMITED Web Hosting by HostDepartment conference call service
answering service