[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] xpath and element names
- From: "Kralidis,Tom [Burlington]" <Tom Kralidis ec gc ca>
- To: <veillard redhat com>
- Cc: xml gnome org
- Subject: Re: [xml] xpath and element names
- Date: Wed, 28 Nov 2007 13:06:25 -0500
> -----Original Message-----
> From: Daniel Veillard [mailto:veillard redhat com]
> Sent: 23 November, 2007 4:42 PM
> To: Kralidis,Tom [Burlington]
> Cc: xml gnome org
> Subject: Re: [xml] xpath and element names
>
> On Fri, Nov 23, 2007 at 01:05:20PM -0500, Kralidis,Tom
> [Burlington] wrote:
> >
> > Hi,
> >
> > I'm using libxml2 Version: 2.6.29 on fc7, with the xpath
> > functionality, to parse an XML document.
> [...]
> > Line 83 shows an attempt to fetch the name of the root element, but
> > I'm not getting any results. What's the approach to
> fetching the name
> > of an element in libxml2's xpath support?
>
> in XPath it's name() / local-name() see the spec, of course
> it's the same in libxml2 !
>
> http://www.w3.org/TR/xpath#function-name
>
> For XPath querying example:
> http://xmlsoft.org/examples/index.html#XPath
>
Hi,
I'm still unable to figure this one out. I've posted a test case (code
at: http://www.pastebin.ca/800703, xml file at:
http://www.pastebin.ca/800704), where I've tried local-name(/*) to fetch
the root element name, but no luck.
Any suggestions or advice are appreciated.
Thanks
..Tom
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]