- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I bet they do not escape xml-characters
Admin
might be valid xml tho :stuck_out_tongue:
Admin
<comment_3>
And where's the WTF?</comment_3>
Admin
In the title.
Admin
Literally you're correct. The most perfect form of correct. Your statement competes with Mathematics on being perfect. I didn't say it was useless, did I? That would have been microaggressing, and I couldn't do that I'm sure.
Admin
Well-formed, sure. Maybe. Valid? I'm not writing that DTD/schema…!
Admin
I've also seen it argued seriously to me that you need to write:
Why? Because the person concerned thought that otherwise the order of the
<elem>
s would be undefined, and that a sequence number was therefore critical. Because XML is designed for representing structured documents where randomly reordered paragraphs are a thing. At least I eventually managed to persuade him that XML naturally supports proper sequences of things (and always has done).Admin
Worth remembering that attributes are unordered, though. XML sees no semantic difference between
and
Admin
TRWTF is it's not zero-indexed.
Admin
But what if you want the elements to be ordered in some way other than the order in the XML file? Huh? You didn't think of that, did you?
</troll>
Admin
There are people who know XML, love XML, and use XML everywhere they can, even if it isn't the best tool to use in that situation.
Then there are people who don't know XML, but still love it and use it everywhere they can.
Admin
Maybe it is, and the zeroth element is somewhere within the ellipsis.
Admin
It shouldn't though. If it regarded your two examples as different,now that would be a wtf.
Admin
I have been known to include an "order" element in a particularly complicated object whose ordering is intrinsically indeterminate and defined at project implementation time, when the ordering itself is not available in the database and we needed to do some hand-rolling. Not the neatest implementation and not the most compact, but straightforward to understand and easy to maintain.
Admin
Admin
Not hard, just tedious. Very tedious. Tedious even by the standards of writing XSD by hand…
Admin
You did see < address_110 > right
Admin
Doesn't mean there isn't an
<address_0>
somewhere.