[xml] xmlSearchNsByHref

Date view Thread view Subject view Author view

From: Bjorn Reese (breese@mail1.stofanet.dk)
Date: Sat Nov 18 2000 - 10:37:18 EST


I am trying to determine whether an element is part of a namespace
or not. Consider the following example:

  <root xmlns:ns="urn:ns">
    <ns:first>
      <second/>
    </ns:first>
  </root>

I parse this document and use xmlSearchNsByHref(doc, node, "urn:ns");
to determine the namespace.

As expected, this returns the ns namespace for <ns:first>.

However, xmlSearchNsByHref() also returns the ns namespace for
<second/>. I would expect it only to return the default namespace
(of which there is none in the document). Is this an error in
xmlSearchNsByHref(), or have I misinterpreted the purpose of that
function?

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Nov 18 2000 - 10:43:53 EST