[XML-SIG] an example of generating XML?

warren henning wkhenning@softhome.net
Mon, 9 Sep 2002 18:26:48 -0700


Hi,
I have found the PyXML documentation to be somewhat incomplete. The example
code, in many cases, doesn't work. Since the W3C documents are more geared
towards programmers implementing it rather than lowly programmers like
myself trying to use a particular implementation, you might understand why
I'm a little bit frustrated.

Could someone give a simple example of generating a valid, well-formed XML
file using PyXML?

Just show me the code to create something simple like:

<?xml version="1.0"?>
<data>
    <node id="1" ack="blah">This is a test node.</node>
    <node id="2">So is this.</node>
</data>

I want something that works.

I even tried printing the __doc__ of various functions. No luck, most have
none.

And I would certainly go to 4Suite.com and look at their documentation, but
their domain got stolen. I mean, if you go there, you get a ton of popup
windows and all this stuff about domain registration. Obviously not 4Suite,
Inc.

The documentation I've found just provides code fragments. I can't figure
out how to make a whole, entire example that can be pasted to a .py file and
run.

I'm just having a lot of trouble, I've tried everything I can think of. Any
help would be much appreciated.

-Warren