Re: [xml] Namespace declaration parent, doc: also broken?



Anthony Carrico said:
On Sat, Feb 07, 2004 at 12:23:39AM -0500, Anthony Carrico wrote:
Namespace declaration serialization seems broken, or absent. For
example:

Namespace declaration parent and document links also seem broken.
For
example:

Hmmm... please pardon my lack of much knowledge in this area, but...
it seems to me that when you declare a namespace an xmlNs structure
is put into the tree.  This structure is treated similarly to an
element, but it does not contain any parent or document pointers
(see http://xmlsoft.org/html/libxml-tree.html#xmlNs).

Now, your first post correctly noted there was a problem when python
serialization was requested for this structure (there was actually
an incorrect memory reference made, which could give wrong results,
or could result in a segfault).  I have made an "enhancement" to the
applicable library routine which (I hope) corrects this:

  bill billsuper tmpdir $ python tmp2.py
  element: <xmlNode (test) object at 0x403f6aac>
  element serialization: '<test xmlns:prefix="http://bogus"/>'
  namespace declaration: <xmlNs (prefix) object at 0x403f6bcc>
  namespace declaration serialization: ' xmlns:prefix="http://bogus";'

The fix will is in CVS (python/libxml.c).  For your second post, I'm
not sure how I can help.  Perhaps you could elaborate?

Regards,

Bill



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