Sbaush wrote:
> I would get this element in xml:
>
> <date month="02" day="06" />
>
> I have write this:
>
> date=ET.SubElement(idsreq,"date")
> date.set("month",month)
> date.set("day",day)
>
> but i get this:
>
> <date day="06" month="02" />
>
> The attributes are not in my order!!
> how i can get the attributes in right order???
XML attributes are not ordered.
the default ET writer sorts the attributes in lexical order, to guarantee con-
sistent output. rolling your own writer won't help, since Python's dictionaries
don't preserve the order either.
</F>
--
http://mail.python.org/mailman/listinfo/python-list