Re: [xml] xmlParseFile and xmlns

On Wed, Apr 22, 2009 at 11:24:51AM +0200, Michael Ludwig wrote:
Juhani Connolly schrieb:
If anyone knows what causes this issue and how to get around it
correctly I would really appreciate any solution/explanation that
could be given.

I don't know the C API, but you have to register namespaces with
prefixes in the XPath context and then search for //atom:item. Maybe
this pointer to the API doc will lead you on the right track:

  xmlXPathRegisterNs is what you need. You create the XPath context for
the document, register the namespace with a non-null prefix e.g. atom
and add the prefix to the query as indicated.


Daniel Veillard      | libxml Gnome XML XSLT toolkit
daniel veillard com  | Rpmfind RPM search engine | virtualization library

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]