Re: [xml] Namespace equality with Python bindings

On Tue, Aug 12, 2003 at 10:40:48PM -0400, Anthony Carrico wrote:
In libxml2 with Python bindings, what is the proper way to check for
xmlNS equality? Is a pointer compare possible?

Is a string compare necessary? Is it like this?:


ns = root.searchNsByHref(doc, "http://blahblah";)
ns.content == root.ns().content

Is this kind of "semantic" issue documented someplace?

  yes in the code ! all the node objects at the python level
are wrappers objects around the internal C objects. The comparison
must be done between the C objects, the python ones are allocated
on the fly.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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