Summary
Converting data from non-XML formats to XML is not particularly difficult, but there are no magic bullets to do it for you. You just have to roll up your sleeves and write the code. Once you've parsed the input data and organized it in the form you want, outputting it as XML is not hard. However, parsing the non-XML input data can be quite a challenge.
Unless the data is truly flat (and real-world data very rarely is), you'll generally want to arrange your XML markup to indicate the hierarchy and structure of the data. There are many different ways to perform the conversion that differ primarily in where the work is done: at the beginning, middle, or end. Thus, there are three broad approaches. If you're extracting data from a relational ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access