[XML-SIG] py2exe and switching from PyXML 4Suite

Mike Brown mike@skew.org
Sun, 15 Dec 2002 05:03:03 -0700 (MST)

Anders Bruun Olsen wrote:
> I can't seem to find any documentation about what methods are available
> for cDocument objects

I don't think there is any yet.
But don't forget about Python's introspection capabilities.

% python
Python 2.2.1 (#1, Jul  1 2002, 19:51:59) 
[GCC 2.95.3 20010315 (release) [FreeBSD]] on freebsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> from Ft.Xml.Domlette import NonvalidatingReader
>>> doc = NonvalidatingReader.parseUri('file:///opus/home/mike/xml/test/dummy.xml')
>>> dir(doc)
['appendChild', 'cloneNode', 'createAttributeNS', 'createComment', 'createDocumentFragment', 'createElementNS', 'createNodeIterator', 'createProcessingInstruction', 'createTextNode', 'hasChildNodes', 'importNode', 'insertBefore', 'isSameNode', 'normalize', 'removeChild', 'replaceChild']
>>> for attr in dir(doc):                                           
...   print attr,":",
...   if eval('doc.' + attr + '.__doc__'):    
...     print eval('doc.' + attr + '.__doc__')
appendChild : Add a new child to the child list
cloneNode : Make a copy of a node from this document
createAttributeNS : Create a new attribute
createComment : Create a new comment node
createDocumentFragment : Create a new document fragment node
createElementNS : Create a new element
createNodeIterator : Create a new node iterator
createProcessingInstruction : Create a new processing instruction node
createTextNode : Create a new text node
hasChildNodes : Return True if the node has children
importNode : Make a copy of a node from any document
insertBefore : insert a new child to the child list
isSameNode : true if this node instance is the same as another
normalize : Combine all neighboring text child nodes
removeChild : Remove a node from a child list
replaceChild : replace a child in the child list