|
jaxml currently doesn't correctly output UTF-8. With this limitation in mind, here's how to recreate Uche's xsa output in ISO-8859-1 :
--- CUT ---
#! /usr/bin/env python
import jaxml
x = jaxml.XML_document(encoding="ISO-8859-1")
x._text('<!DOCTYPE xsa PUBLIC "-//LM Garshol//DTD XML Software Autoupdate 1.0//EN//XML" "http://www.garshol.priv.no/download/xsa/xsa.dtd">')
x.xsa()
x._push()
x.vendor().name("Centigrade systems").email("info@centigrade.bogus")
x._pop()
# No need for a _push()+_pop() sequence
# on last group
x.product(id="100°").name("100° Server").version("1.0")
getattr(x, "last-release")("20030401") # ugly ?
x.changes()
x._output("test-xsa.xml")
--- CUT ---
|