[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Simplicity of XPath

  • From: Miloslav Nic <nicmila@i...>
  • To: Matt Sergeant <matt@s...>
  • Date: Fri, 10 Nov 2000 16:39:19 +0100

xlab xpath
In last few months I had to answer quite a few XPath related 
questions so I am speaking from some experience

/html/body/p
//table

are very easy to grasp

//body/p[@id=name(//head/meta[3])]/span[position()=last()]/preceding-sibling::*[starts-with(name(),'s')]

needs a bit of experience

It is like a regular expressions:

match: abc is very easy
match: (a|b) not so difficult
today I needed:  (\(|\)) and a colleague did not understand and it is
just a previous case with parentheses instead of letters

The good thing about XPath is a reasonable learning curve:
you will learn basics in 30 minutes and learn and learn years to come

You may find these Zvon resources useful:

http://zvon.org/xxl/XPathTutorial/General/examples.html
http://www.zvon.org/cgi-bin/xlab/bin/xpath.py
http://www.zvon.org/cgi-bin/xlab/bin/xpathAxes.py


Matt Sergeant wrote:
> 
> "Bullard, Claude L (Len)" wrote:
> >
> > Being able to reapply XPath has advantages
> > on the learning curve although the syntax of XPath isn't
> > all that easy to learn.
> 
> I always thought it was one of the easier aspects to pick up. Is there a
> general consensus on this matter?
> 
> Or is it that the simple (abbreviated) parts of XPath are easy, but the
> non-abbreviated parts are hard?
> 
> --
> <Matt/>
> 
>     /||    ** Director and CTO **
>    //||    **  AxKit.com Ltd   **  ** XML Application Serving **
>   // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
>  // \\| // **     Personal Web Site: http://sergeant.org/     **
>      \\//
>      //\\
>     //  \\

-- 
******************************************
<firstName> Miloslav </firstName>    
<surname>   Nic      </surname>     

<mail>    nicmila@i...    </mail>   
<support> http://www.zvon.org  </support>
<zvonMailingList> 
    http://www.zvon.org/index.php?nav_id=4 
</zvonMailingList>

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.