|
RE: Outputing dictionaries and lists as XML: msg#00011lang.jython.user
yup, I use jdom tree = QuickFormLib.convertPythonModuleToJdom(page) xmlfilename = "%s\%s.xml" % (FORMDIR, name) xmlfile = open(xmlfilename, 'wb') QuickFormLib.writeJdomToXmlFile(tree, xmlfile) QuickFormLib.printPureJavaTree(0, tree) def writeJdomToXmlFile(doc, file): serializer = jdom.output.XMLOutputter(" ", 1) serializer.output(doc, file) file.close() of course you still have to create the jdom tree, but that's pretty easy. QuickFormLib is my own module and is dedicated to a very specific project of course if your structure is known ahead of time and is not too complex you can easily just write the xml yourself. I've done that also and it is not hard but is more tedious than using jdom. -----Original Message----- From: Ged Byrne [mailto:gedb01@xxxxxxxxxxx] Sent: Saturday, February 08, 2003 8:54 AM To: Jython Users Subject: [Jython-users] Outputing dictionaries and lists as XML Importance: Low Are there any modules that make it easy to output lists and dictionaries as XML? __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Jython-users mailing list Jython-users@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/jython-users ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Readline and multiline input, Tessa Lau |
|---|---|
| Next by Date: | RE: Outputing dictionaries and lists as XML, Ged Byrne |
| Previous by Thread: | Outputing dictionaries and lists as XML, Ged Byrne |
| Next by Thread: | RE: Outputing dictionaries and lists as XML, Ged Byrne |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |