[XML-SIG] So how can _we_ use XML?

Andrew M. Kuchling akuchlin@cnri.reston.va.us
Fri, 28 Aug 1998 12:09:59 -0400 (EDT)

Sean Mc grath writes:
>[Mark Hammond]
>>I tend to learn best by example, so I would like to start using XML somehow!
>>Sow how can/should Python use XML?  Where do XML documents fit with Python?
>>I dont mean in an esoteric sense - I mean where does it make sense now?  Or
>>at least to be working towards now?  The FAQ example in Lars Marius
>Did you see XML programming in Python in Dobbs? August of
>last year I think.

	February 1998, according to www.ddj.com.  For $5, you can
purchase an electronic copy of the article from the Web site.

	In answer to Mark's question: Mark, are you asking what XML
means to the Python codebase itself, or what XML is good for in

	In general, XML can be used for any tree-structured data, both
for database-ish applications (say, for product catalogs), or for
document-ish applications (HTML will apparently be mutating into an
XML Document Type Definition in the long term, for example).

	If, as seems likely to happen, XML becomes very common, and
the tools are good enough, then when you need a file format, you may
just automatically reach for the XML module, instead of coming up with
your own format from scratch.  That way, your files are fairly
readable, and you gain the ability to run XML validators over them,
load them into XML editors, don't need to debug your own custom
parser, and so forth.  I think Python is powerful enough, and has a
pleasant enough syntax, that we can make dealing with XML a piece of

	In direct reference to the Python code base, that's a more
tenuous influence.  XML doesn't have many repercussions for the Python
interpreter itself, though it is exerting strong pressure to add wide
string support.  Fred Drake has long been muttering about converting
the Python docs from LaTeX to some SGML or XML-based format, but
there's no obvious Document Type Definition to use; should we invent a
Python-doco specific one, or use an existing thing such as DocBook?
The LaTeX -> *ML transition will probably happen someday, but there's
no great hurry about it; we can wait and see if SGMLtools helps
DocBook take over the world, or if something else comes up.

Mark Hammond wrote:
>Garshol's document is obviously appealing.  Gendoc could possibly generate
>XML instead of direct to HTML?

	pythondoc, Daniel Larsson's rewrite of gendoc, can generate
XML; I keep meaning to get around to looking at it and sending Daniel
some comments.  See http://starship.skyport.net/crew/danilo/pythondoc/
I think his plan is to translate from the XML format to HTML, LaTeX,
RTF, or whatever, instead of having HTML hard-wired into the code as
in gendoc.

A.M. Kuchling			http://starship.skyport.net/crew/amk/
"Since the invasion of Grenada," a military source informed me, "we call it
C^5. That's Command, Control, Communications, Computers and Confusion."
    -- Barbara Garson, _The Electronic Sweatshop_ (1988)