xml with python <-> python deprecated - why?

Frank Millman frank at chagford.com
Tue Dec 20 08:47:35 EST 2005


Duncan Booth wrote:
> Frank Millman wrote:
>
> >
> > I am curious. Why is xml frowned upon? Is my new method ok, or is there
> > a better way?
>
> Using XML gives you portability at the expense of increased code
> manipulating the data structures.
>
> Try creating a button with "<<<" as the label and you'll find why your xml
> solution isn't ideal.

Good point.

> For anything non-trivial you'll find it much better
> to use one of the existing xml libraries to build your xml and then you'll
> find why the non-xml solution looks simpler.
>

Another good point - things tend to get more complex as they evolve.

> Generally speaking you make the decision to use xml or not based on a lot
> of factors. Sometimes it is the best solution, other times using something
> like a Python pickle might be better. Use whichever you are happy with
> here.

My second method, using dictionaries instead of xml, seems equally
simple and equally fast, and it may save me some trouble in the future,
so I will run with it.

Thanks for the response

Frank




More information about the Python-list mailing list