XML

Roman Suzi rnd at onego.ru
Sun Jun 29 10:36:31 CEST 2003


On Sun, 29 Jun 2003, Stuart Bishop wrote:

>On Tuesday, June 24, 2003, at 02:49  AM, Roman Suzi wrote:
>> ------------------
>> foo = "123"
>> bar = "456"
>> zoo = "la\"lala"
>> ------------------
>>
>> And it's not very hard to parse that.
>> In case of XML I will need something like
>>
>> <?xml version="1.0"?>
>> <foo>123</foo><bar>456</bar><zoo>la&quot;lala</zoo>
>
>> - not a big deal, but it's harder to parse. And also XML software keeps
>> changing (or so it seems), and this gives a sense of instability.
>
>Are you just assuming this? The following works happily under
>both Python2.1.3 and Python2.2.3, and probably every version
>since minidom appeared.

Yes, these were simple examples. But if I were into weird things 
I were in trouble.

>XML gets pretty hairy, generally when you are trying to *do* something
>hairy. If you can program Python, you probably have no need for XSLT.
>DTD's and schemas are only needed if you need to validate your data.
>The advantage is, that these tools and many more are available if you
>*do* need them.

I agree.

>XML can also be dead easy if you don't get carried away.
>Using a better interface than the DOM (Elementree or pyRXP)
>makes it even easier, since you end up with nice pythonic
>lists'n'stuff to deal with instead of having to lookup method
>names like getElementsByTagName or wholeText.

Currently I found a good piece of software I searched for for my document
needs: docutils. It's ability to convert plain (well-reStructured) text to
xhtml, latex, xml is amasing.

Sincerely yours, Roman Suzi
-- 
rnd at onego.ru =\= My AI powered by GNU/Linux RedHat 7.3






More information about the Python-list mailing list