Re: [xml] xmlNodePtr properties missing xmlns:xxxx



On Thu, Jun 23, 2011 at 08:28:05AM -0700, Andrew Hartley wrote:

I have an iXBRL document that I am parsing with LibXml2.  The problem I have
is that I register all the namespaces which are mostly held in the <html>
root node, no problem.  But, there are some namespace declarations in some
of the document nodes as attrbutes of that particular node.  When I get the
attributes of a particular node that has a namespace declaration and I read
the attributes thus:

   xmlAttrPtr pAttr = pCurNode->properties;

I then iterate through all the attributes, and they are all there apart from
the one named 'xmlns:xxxx="blahblahblah" .  Is there anyway I can locate
these namespace declarations, so that I can register them?

Any advice on this problem will be much appreciated.

  They are not seen as attributes but as namespaces on that node.
It's the elem->nsDef  list of xmlNsPtr, see tree.h

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



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