waider: (Default)
waider ([personal profile] waider) wrote2005-10-09 01:33 pm
Entry tags:

XML question

So, to get the basics out of the way, I hate XML. I'm forced to deal with it for a hack I'm fiddling with right now, though. And having poked this with a stick for the last week, I've finally found the problem: I am sending data formatted as <foo><bar 1><bar 2><bar 3></foo> and the client wants <foo><bar 2><bar 1><bar 3></foo>, i.e. the order of the contained elements turns out to be important. Now, as far as I can tell, the contained elements are not order-dependant; they're essentially attributes of the container (foo) which can logically interact with each other unambiguously regardless of order (one's a default setting, one's a current setting, and one's a timeout value). While I'm happy to cast asparagus on Microsoft for this (for theirs is the client) I'm curious as to whether this is common behaviour or just short-sighted programming?

(Anonymous) 2005-10-09 03:26 pm (UTC)(link)
A simple way to cope with order dependence would be a very welcome addition to XML::Simple IMHO. I did something using the underlying "real" XML stuff, and it wasn't much fun.

But I'm slouching towards Python anyway. tagsfrom10k was a mostly painless coding experience. Although there are some issues with internationalization that I don't get.

ext_181967: (Default)

[identity profile] waider.livejournal.com 2005-10-09 03:44 pm (UTC)(link)
If I cared more about it, perhaps. But I don't, presently. Seems like you could just bolt Tie::IxHash into it and bob's your uncle.