<cf_sarcasm>thanks for all the replies: reply count = 0</cf_sarcasm>
kidding...I
know it's the weekend ;-)
So I ended up using CFXML instead and it works fine...my guess is it was an
issue with the processing instruction:
<?xml version='1.0' encoding='utf-8'?> and whitespace or something that the
xmlNew() function must screw up n CFMX 6.1.
Below is the method I'm now using...works perfect on both 6.1 an 7:
<cffunction name="queryToXML" access="public" returntype="string"
output="false">
<cfargument name="queryObj" type="query" required="yes" hint="query
to be converted to XML">
<cfargument name="rootNodeName" type="string" required="no" default="root"
hint="name of the root node">
<cfargument name="rowNodeName" type="string" required="no"
default="data"
hint="name of the record level node">
<!--- make an array of the columns for looping --->
<cfset cols = listToArray(ARGUMENTS.queryObj.columnList)>
<cfoutput>
<cfxml variable="XMLResult">
<root>
<columns>#Trim(XMLFormat(arrayLen(cols)))#</columns>
<rows>#Trim(XMLFormat(ARGUMENTS.queryObj.recordCount))#</rows>
<cfloop from="1" to="#ARGUMENTS.queryObj.recordCount#" index="currRec">
<#ARGUMENTS.rowNodeName#>
<!--- loop over the columns and add the value for each one to the
row --->
<cfloop from="1" to="#arrayLen(cols)#" index="currCol">
<cfset currColName = lcase(cols[currCol])>
<cfset currColValue = ARGUMENTS.queryObj[cols[currCol]][currRec]>
<#currColName#>
#Trim(XMLFormat(currColValue))#
</#currColName#>
</cfloop>
</#ARGUMENTS.rowNodeName#>
</cfloop>
</root>
</cfxml>
</cfoutput>
<cfreturn toString(XMLResult)>
</cffunction>
Cheers
Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234205
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54