Learning the basics of XML for the first time from W3C tutorials. How are most XML files generated? Does the server side application usually print a complete XML file to be parsed each time there is new data?
I have a CGI application in C and it includes the SQLite API. Is the best way to do some sort of printf to a XML file (using my data from the database) so it can be parsed?
Thanks.
XML can be generated in any way one would like, that is one of its advantages.
It is generally possible to spew out XML, although it is not very human readable. If you directly write XML, use some utility class or library (there are quite a few around) that can help you create nicely formatted XML (e.g., it will track the current depth, what the current open element is, etc.)
Many APIs (also for OOP languages) also allow you to directly manipulate a DOM tree that represents your XML document, and then to force its output as XML.