[xml] xmlGetNodePath and default namespaces
- From: Andrew Jackson <ajj nist gov>
- To: xml gnome org
- Subject: [xml] xmlGetNodePath and default namespaces
- Date: Tue, 4 Mar 2008 11:02:56 -0500
Hi,
I've been writing some code using the version of libxml2 that is
shipped with OS X 10.4 and using xmlGetNodePath to list the elements
in my files (which use a default namespace). I recently switched to
the latest version and now, instead of a listing of names I get
things like /*/*[3].
Looking at the archives and the code I see that in tree.c there is a
comment (around line 4318) that says:
/*
* We cannot express named elements in the default
* namespace, so use "*".
*/
I understand that this change was to ensure that XPath useable
strings were returned, but that doesn't do me any good as I don't
know what I'm getting back if I use the string since I don't know
what the element is.
How should I go about extracting the names of the elements?
Thanks
Andrew
--
Dr Andrew Jackson
NIST Center for Neutron Research
100 Bureau Drive, Stop 6102
Gaithersburg, MD 20899-6102
Ph: 1 (301) 975-3146
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]