Status bar messages explain page details - > Please enable them with javascript < - Safe Christian Site - > Mozilla / Firefox friendly Site for speed. IE loads / sticks more slowly but better graphics < - God Bless you Deeply - > Truly < - In JESUS - > AMEN < - Enjoy !!! ALLELUIA and HALLELUJAH <<<<<<<-------
@TonyTheLion IMO, the biggest problem is that they tried to compromise between human readability and machine readability -- and instead of getting both, they got neither.
@R.MartinhoFernandes If you wrote a file called "myconfig.cfg" structured however you want, to transform it to, say, an html file, you'd have to build a program to do it
@kbok Is not my job to teach English. But, more relevantly, that's just a difficult phrasing, not a fundamentally difficult exercise. All you'd have to do is std::cin a string and see WTF happens, or Google the documentation
@thecoshman Just like a bucket of water is nice in Hell. I don't believe humans should be writing XML in the first place. I'm sure you'll agree it sucks for that.
@R.MartinhoFernandes And the program can then use that tree. I once wrote an XML parser myself that does exactly and only that (for a C++ exam where we got the data in XML format and had the choice to either write it outselves or use some ready-made XML parser)
@MooingDuck There actually are, error reporting in the case of a broken XML. It can tell exactly where the end tag is missing or something, while it's a bit harder with JSON
@R.MartinhoFernandes Rather than have to write a program to parse your own file, you can use XML parsers which already exist and transform xml files without having to write a custom program
@R.MartinhoFernandes Think so? I don't see how that is true. Or do you mean I need to transform the data anyways, and that I should've transformed from the get-go without building a tree of strings first?
@MooingDuck The discussion started without Protobuff or json, hence if you ask "why use xml?" then obviously there is a reason why or it wouldn't exist
As I said a while back, it's attempting to compromise, not to be the best at one thing. Unfortunately, it's a lousy compromise that ends up lousy at anything.
@R.MartinhoFernandes Sure there is -- to satisfy a buzzword-happy boss, who's 15 years out of date, so he's convinced that XML is "the next big thing". So, you use it simply: <myformat>binary_data</myformat>
@Neil Not really. Everything XML offered already existed (e.g., S-expressions), but the people who advocated it didn't recognize those pre-existing solutions or the fact that they were doing nothing new.
The whole discussion is centered around "Why use XML? It doesn't have advantages." I have proven they have advantages. That's all I'm after. Not saying you'd prefer XML
@MooingDuck Actually Fortran is probably more excusable than XML. In practice, it's really hard to find another language that can match Fortran for raw speed in its area. C++ is about as close as you can get, and even Intel's C++ compiler is still slower than (for an obvious comparison) Intel's Fortran compiler.
Q: Why use XML? A: To interact with existing XML interfaces. Not Q: Why use XML? A: Because it can do stuff in a mediocre manner. Nor Q: Why use XML? A: Because it filled a hole years ago.
@R.MartinhoFernandes If your plane crashes in the middle of nowhere and all you have to eat are saltine crackers. Despite being tasteless and generally unappetizing, you cannot deny that it still offers a reason to be eaten.
@Ell If I have something like f(int *, int *);, the pointers might point to the same memory, so when I write via one, I have to read from memory via the other, in case what I just wrote happens to be the same data. Without that, I could save it in a register instead.
JSON is way simpler and its logic is simple to implement (especially compared to XML's one) but I haven't seen any decent implementation of a JSON parser/producer in C++.