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?
no subject
no subject
no subject
(Anonymous) 2005-10-09 03:26 pm (UTC)(link)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.
no subject
no subject
Perl people thinking that everything's-a-hash often run into this problem. I remember Whitaker fighting XML::Simple too recently while talking to Wells Fargo.
no subject
no subject
Regardless, you may be bumping up against limitations in your processing library. Consider python, as its library is pretty robust.
To answer your other question, I'm routinely astounded at the odd decisions made by developers with which we exchange XML. I often think it would be easier to send the clients code to process the messages we plan to exchange. Here. Use this.
I'd rather process XML than binary files, however. For that, I'm grateful.
no subject
Nah. The library is robust. It's that it hasn't got a way of preserving order. There's a more complex library to do that, and really for the amount of XML I'm generating it's easier to hand-code it. And really now. Changing the entire language I'm using (which would, incidentally, require me to learn a whole new language AND a library API) just because of some minor failing in the existing library? Seems a bit overkill...