[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-xml-sig
Subject:    [XML-SIG] pyDOM NamedNodeMap - bug report and problem
From:       akuchlin () mems-exchange ! org (Andrew M !  Kuchling)
Date:       1999-08-13 13:41:20
Message-ID: 14260.8320.385791.157498 () amarok ! cnri ! reston ! va ! us
[Download RAW message or body]

Dieter Maurer writes:
>For some unknown reason (a bug, I think),
>the real attribute information is in the "children[0]" attribute
>of the returned "item".

The DOM implementation builds an internal tree of objects of class
_node; however, users of the implementation never see a _node
instance, but instead an instance of Element, Text, or whatever, that
acts as a proxy for the _node instance.  The user-visible proxy holds
the parent pointer for the node, thus avoiding creating a cycle of
references and leaking memory.  To create the proxy for a _node n, you
use NODE_CLASS[ n.type ](n, self._document ) .  As a note to users, if
you *ever* get returned a _node instance, that is a bug and should be
reported.

-- 
A.M. Kuchling			http://starship.python.net/crew/amk/
The story so far: In the beginning the Universe was created. This has made a
lot of people very angry and has been widely regarded as a bad move.
    -- Douglas Adams, _The Restaurant at the End of the Universe_




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic