common.xmlutils (version 0.1, 2 May 2003)
index
e:\bothans\common\xmlutils.py

Our XML library (inspired from xmlutils, hugely modified)
Also inspired by the previous version by David Ferlier

 
Modules
            
logging
xml.dom.minidom
 
Classes
            
TagWrapper
_nonRootTW
 
class TagWrapper
      Our own TagWrapper. We first tried the TagWrapper of pyRXP which was
damn fast and pretty simply written, but we couldn't write XML on
the fly. So here we go, you can create and parse XML like python code.
Example:
 
t = TagWrapper("<test/>")
 
will create the XML "<test/>"
 
t.foo = "works"
t.bar = "like"
t.fine = "a"
t.great = "charm"
 
will modify the precedent message and give
 
<test><foo>works</foo><bar>like</bar><fine>a</fine><great>charm</great>
</test>
 
For parsing :
 
for element in t:
    print element
 
 will print "works", "like", "a", "charm"
 
 Each TagWrapper has a dynamically generated tagName attribute, so
 t.tagData == "test" and t.foo.tagName == "foo"
 
 You can call tagNewChild on any TagWrapper object to integrate a
 whole XML hierarchy inside it. Example:
 
 new = t.tagNewChild("<duh>damn</duh>")
 
   Methods defined here:
_TagWrapper__checkValidity = __checkValidity(self)
__getattr__(self, attr)
__init__(self, xml)
__iter__(self)
__len__(self)
__repr__(self)
__setattr__(self, attr, value)
__str__(self)
tagNewChild(self, xml)
toXml(self)

Data and non-method functions defined here:
__doc__ = 'Our own TagWrapper. We first tried the TagWrappe... new = t.tagNewChild("<duh>damn</duh>")\n '
__module__ = 'common.xmlutils'
 
class _nonRootTW(TagWrapper)
       
   Methods defined here:
__init__(self, dom_elem, dom_doc)
toXml(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'common.xmlutils'

Methods inherited from TagWrapper:
_TagWrapper__checkValidity = __checkValidity(self)
__getattr__(self, attr)
__iter__(self)
__len__(self)
__repr__(self)
__setattr__(self, attr, value)
__str__(self)
tagNewChild(self, xml)
 
Data
             __author__ = 'Michel Rasschaert <mrasschaert@neocles.com>'
__date__ = '2 May 2003'
__file__ = r'e:\bothans\common\xmlutils.pyc'
__license__ = 'This file is part of Bothans\n\n Bothans is fre...lace, Suite 330, Boston, MA 02111-1307 USA\n '
__name__ = 'common.xmlutils'
__status__ = 'beta'
__version__ = '0.1'
log = <logging.Logger instance at 0x00AB0C20>
 
Author
             Michel Rasschaert <mrasschaert@neocles.com>