creating XML
I want to build an xml file from a DB. I see how to do it but cannot get it the way it should be:
<updates>
<update> date="27-10-2010" label="some text here"/>
</updates>
When I try and recreate the above layout I cannot get the line to read correctly. I use my query:
<cfquery name="messages" datasource="myData">
SELECT *
FROM myMessages
</cfquery>
<cfoutput query="messages">
<update label="#XMLFormat(message)#"/>
</cfoutput>
This produces nothing on my page. But if I put a space bfor the update:
<cfoutput query="messages">
< update label="#XMLFormat(message)#"/>
</cfoutput>
I get this:
< update label="this is a test message" />
< update label="this is another one" />
This is very close to what I want but the xml cannot be read if there is a space. What can I do? Any thoughts would be great
Thanks
George
