If you want your ColdFusion page to generate valid, well-formed XML, a really easy way to get started is with the
cfxml tag:1. Add a pair of opening and closing
cfxml tags to your page.2. Include whatever XML you wish between them.
3. ColdFusion will parse the XML and return it to you as a XML Document object structure (you specify the name of the structure with the
VARIABLE attribute, as shownBut what you're getting isn't a XML doc in the sense you are thinking:
For this reason, when ColdFusion parses an XML document, it returns the information from the document in a form that's very, very similar to a ColdFusion structure. Just use the familiar, dot notation syntax to refer to the various pieces of information in the structure. Then use the familiar structure-related functions (such as StructKeyExists(), StructInsert() and so on) to find out the elements within the XML document, or to make changes to the XML data.
Does that make sense? Check out the PDF at the URL above to get a full sense of what the XML tags in MX are for. Probably one of the best sources I've found so far.
