Can you give an example of the xml and tell us which line it is happening on?
The error is probably either happening here: <CFSET Variables.xml_rootname="#stConvertedDom.document.root.name#"> or <CFIF Variables.xml_rootname IS "Something> It could be CF is seeing the quotes and trying to convert stConvertedDom.document.root.name to a string, which it isn't. If it gets past there, comparing it to the string "Something" is where it is happening. If it's happening here, try cfdump on Variables.xml_rootname, it should become obvious what to reference. -- jon mailto:[EMAIL PROTECTED] Friday, July 25, 2003, 3:04:49 PM, you wrote: ct> We are switching to CFMX from CF 5. We were using a third party software (granularity) to parse our XML docs. We come to find out that they do not support CFMX. Below is some code I am using ct> but it is not doing what I need it to do. I need to be able to check the XML root name to see what kind of XML doc it is. When I try to do this, it tells me that "You have attempted to ct> dereference a scalar variable of type class java.lang.String as a structure with members.". Can anyone help me with this? ct> <CFDIRECTORY ACTION="LIST" DIRECTORY="#Application.xml_filePath#" NAME="xmlDirectory" FILTER="*.xml" SORT="name ASC"> ct> <!--- Check to see that there is at least one XML file ---> ct> <CFIF xmlDirectory.recordcount GT 0> ct> <!--- Loop through all XML files in the directory ---> ct> <CFLOOP QUERY="xmlDirectory"> ct> <CFFILE action="read" file="#Application.xml_filePath#\#xmlDirectory.Name#" variable="input_xml" /> ct> <!--- New MX stuff input on 07/24/2003---> ct> <CFSET stConvertedDom = XmlParse(input_xml#,"no")><!--- granularity suggested ---> ct> <cfset stCfDom = "#Application.xml_filePath#\#xmlDirectory.Name#"> ct> <cfset path = #Application.xml_filePath#> ct> <cfset directory = #xmlDirectory.Name#> ct> <cfoutput>input xml: #stConvertedDom#</cfoutput><br> ct> <cfoutput>input xml: #stCfDom#</cfoutput><br> ct> <cfoutput>xml filepath: #path#</cfoutput><br> ct> <cfoutput>xml directory name: #directory#</cfoutput> ct> <CFSET Variables.flag_fileOK="Y"> ct> <CFIF Variables.flag_fileOK IS "Y"> ct> <!--- Extract the root element name of the XML structure (use the stCfDom structure because the root ct> element name cannot be retrieved from the stConvertedDom structure); the root element name is ct> used to determine whether the XML document contains Program Status or Risk data ---> ct> <CFSET Variables.xml_rootname="#stConvertedDom.document.root.name#"> ct> <!--- Set directory paths based on whether the file is Status or Risk update ---> ct> <CFIF Variables.xml_rootname IS "Something> ct> Go somewhere ct> <CFELSE> ct> Go somewhere else ct> </cfif> ct> Thanks all. ct> Brian Yager ct> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

