Hi all,
I recently dowloaded CFXML toolkit and encounter a problem using SQL
or Xpath style to query XML file. The XML file format is something like
this :
<CF_XMLDatasource Name="MyData">
<RecordList>
<Record>
<company_name>Dummy Company</company_name>
<company_size>4</company_size>
<alt_address>test</alt_address>
</Record>
<Record>
<company_name>Dummy Company2</company_name>
<alt_address>test</alt_address>
</Record>
<Record>
<company_name>Dummy Company3</company_name>
<company_size>5</company_size>
</Record>
</RecordList>
</CF_XMLDatasource>
When I run this code :
<CF_XMLQuery Datasource="MyData" Name="test" Type="SQL">
select company_name from MyData
</CF_XMLQuery>
Then I received this error message :
Error Diagnostic Information
An error occurred while evaluating the expression:
valuetoput =
replace(listgetat(attvaluelist,counter,'|'),'_nothing_','','one');
QuerySetCell(xmlq,i,valuetoput);
counter = counter + 1;
Error near line 1, column 94.
--------------------------------------------------------------------------------
The column name (Record_company_size) that you have specified is invalid. Either this
query does not have a column
with that name, or you have specified one of the reserved column names, e.g.,
RecordCount
The error occurred while processing an element with a general identifier of (CFSCRIPT),
occupying document position (1:10415) to (1:10424) in the template file
C:\CFusion\CustomTags\xml\XMLQuery.cfm.
Please advice. Thanks in advance.
-----------------------+
cf-xml mailing list
http://torchbox.com/xml/list.cfm