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

The string-length function returns the number of characters in the string. You must use &lt; as a substitute for < and &gt; as a substitute for > .
 
//*[string-length(name()) = 3]
Select elements with three-letter name

     <AAA>
          <Q/>
          <SSSS/>
          <BB/>
          <CCC/>
          <DDDDDDDD/>
          <EEEE/>
     </AAA>
Open the example in XLab. | Tree view (JPG)
 
//*[string-length(name()) < 3]
Select elements name of which has one or two characters

     <AAA>
          <Q/>
          <SSSS/>
          <BB/>
          <CCC/>
          <DDDDDDDD/>
          <EEEE/>
     </AAA>
Open the example in XLab. | Tree view (JPG)
 
//*[string-length(name()) > 3]
Select elements with name longer than three characters

     <AAA>
          <Q/>
          <SSSS/>
          <BB/>
          <CCC/>
          <DDDDDDDD/>
          <EEEE/>
     </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