Re: [xml] Help needed to get all namespace and Prefix for every node in the document



On Thu, Aug 04, 2005 at 06:56:52AM -0700, gopabandhu patra wrote:

Hi All,

I want to get all namespace and Prefix for every node in the document. Is there any in built function in 
Libxml2 from where I can get this?.

  no.
This would be useless you can have
  prefix    namespace name
  foo       http://example.com/foo
  foo       http://example.com/bar
  bar       http://example.com/foo
  bar       http://example.com/bar
all declared and used in the same document. that list will be hard to use
for anything meaningful

Please help me. If it is not there, can you say some work around regarding this?.

  Scan the document and collect them. But reading the Namespace in XML spec
before coding would probably be more useful.
    http://www.w3.org/TR/REC-xml-names/

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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