...and chances are, it would be wrong. XML looks much simpler than it actually is.
I spend most of my @work time working with data interchange with various financial institutions and get to work with 'XML' files all the time. The problem is, they tend to generate it just as you say: with a few print statements. So what happens is we get files that *look* like they should be XML, but fail in one or more ways.
This is one of the reasons you see websites and databases with text like "<amp;" and such everywhere. Someone doesn't encode properly, someone doesn't decode properly, etc.
The problem is so common that whenever I get a new XML data feed, the first thing I do is run it through an XML validator. (Of course, when you point out that the file you receive isn't valid XML, they'll adamantly insist that it is. Then you're stuck with the job of trying to get the data into your system without making the data any worse than it already is.)
For all the problems that XML is supposed to solve, I have more headaches with XML feeds than anything else.
...roboticus
When your only tool is XML, all data interchange problems look like a pain in the ass.
In reply to Re^2: Save results into one big XML file help!
by roboticus
in thread Save results into one big XML file help!
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |