[XML-SIG] XT (XML Toolkit)

Petko Petkov ppetkov at gnucitizen.org
Thu Dec 1 15:23:05 CET 2005


Guys I've been working in the past few weeks on a project that was
previously called Hackers XML Toolkit. Well, after the official release
I liked it so much that I changed the name to XML Toolkit. You can
download the code from

http://www.gnucitizen.org
http://www.gnucitizen.org/data/download/xt-0.7.BETA.py

Check it out and tell me what you think. BTW, there is a simple demo of
the stuff you can do with XT. My module is not as powerful was SAX or
DOM but has some neat functionalities that may simplify your work a bit.

# DEMO
import xt

element = xt.Element().loadstring('''
<element><name>XT<name/></element>
''')

element = xt.Element().loadfile('xml.xml')

element[0]

for e in element:
    print e.namespace

e['document']
e['{urn:namespace}document'].name = 'the_document'
e['definitions']['service'].attributes['name']

element.sort()
element.append(Element('another_one'))

Well, you can use it in many other ways. :)

Thanks.


More information about the XML-SIG mailing list