BTW this is a useful page, it lets you experiment with XPath expressions...
http://www.zvon.org:9001/saxon/cgi-bin/XLab/XML/extras.html
Its part of the excellent Zvon tutorial for XPath and XSLT.
http://www.zvon.org/xxl/XPathTutorial/General/examples.html
James
__
> > However the following expressions
> >
> > /.
> > /self::node()
> >
> > refer (AFAIK) to the document node, not the first child node (the root
> > element). So the following expressions would return a blank string,
since
> > name() of a document is empty according to the XPath spec.
> >
> > nam
> However the following expressions
>
> /.
> /self::node()
>
> refer (AFAIK) to the document node, not the first child node (the root
> element). So the following expressions would return a blank string, since
> name() of a document is empty according to the XPath spec.
>
> name(/.) or name(/se
Hi Bob
From: "bob mcwhirter" <[EMAIL PROTECTED]>
> On Wed, 11 Jul 2001, James Strachan wrote:
>
> > From: "bob mcwhirter" <[EMAIL PROTECTED]>
> > > > Hi,
> > > > What is the XPath query for the name of the first child element?
> > >
> > > Probably something like this:
> > >
> > > local-name(/.)
>
On Wed, 11 Jul 2001, James Strachan wrote:
> From: "bob mcwhirter" <[EMAIL PROTECTED]>
> > > Hi,
> > > What is the XPath query for the name of the first child element?
> >
> > Probably something like this:
> >
> > local-name(/.)
> > namespace-uri(/.)
>
> Choose either name() or local-name() depe
From: "bob mcwhirter" <[EMAIL PROTECTED]>
> > Hi,
> > What is the XPath query for the name of the first child element?
>
> Probably something like this:
>
> local-name(/.)
> namespace-uri(/.)
Choose either name() or local-name() depending on if your document uses
namespace prefixes then use eithe
On Wed, 11 Jul 2001, Mike Skells wrote:
>
> Hi,
> What is the XPath query for the name of the first child element?
Probably something like this:
local-name(/.)
namespace-uri(/.)
or
name(/.)
-bob
___
dom4j