>> English << | česky | Nederlands | Français | Español | По-русски | Deutsch | 中文 | Italiano | Polski ZVON > Tutorials > XPath Tutorial
>> Example 1 << | Prev | Next

The basic XPath syntax is similar to filesystem addressing. If the path starts with the slash / , then it represents an absolute path to the required element.
 
/AAA
Select the root element AAA

     <AAA>
          <BBB/>
          <CCC/>
          <BBB/>
          <BBB/>
          <DDD>
               <BBB/>
          </DDD>
          <CCC/>
     </AAA>
Open the example in XLab. | Tree view (JPG)
 
/AAA/CCC
Select all elements CCC which are children of the root element AAA

     <AAA>
          <BBB/>
          <CCC/>
          <BBB/>
          <BBB/>
          <DDD>
               <BBB/>
          </DDD>
          <CCC/>
     </AAA>
Open the example in XLab. | Tree view (JPG)
 
/AAA/DDD/BBB
Select all elements BBB which are children of DDD which are children of the root element AAA

     <AAA>
          <BBB/>
          <CCC/>
          <BBB/>
          <BBB/>
          <DDD>
               <BBB/>
          </DDD>
          <CCC/>
     </AAA>
Open the example in XLab. | Tree view (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
water softener MSN Alojamiento Web UNLIMITED Web Hosting by HostDepartment UK Domain Names
UK Domain Names VoIP Internettelefonie Hosted Exchange, SDSL VoIP Internettelefonie AT VoIP Internettelefonie DE