Log In    |    Knowledge Base    |    4D Home
Tech Note: Debugging XML with Export
Published On: November 13, 2006

4th Dimension's DOM (Document Object Model) XML commands support reading and writing valid XML. While it's natural to think of XML as text, the DOM commands treat XML as a structured tree of linked nodes. Each node has a name, may have a value, and may have attributes. Ultimately, the XML tree can be converted to text but, internally, the commands always work with a tree. Within the 4th Dimension environment, an XML tree is largely invisible until it is converted to a finished XML document. As anyone who has struggled to create XML knows, it is hard to debug something you can't see. When creating XML with the DOM commands, writing the contents of the tree out for inspection with DOM EXPORT TO VAR or DOM EXPORT TO FILE can ease debugging. Additionally, using the DOM EXPORT commands is a great way to learn more about what the various DOM commands do.

Download Complete Tech Note and Example: Windows | Mac