Hi

just starting using CF_XML - very cool! I think I might have met a small bug
though - see listing below - is there a reason why the second example should
fail?

- Dave


---------------
<!--- This illustrates an order dependent bug in CF_XMLDatasource.
 Two identical structures apart from the ordering, one works, one fails.
--->

<CF_XMLDatasource Name="MyDatasource">
 <people>
  <person>
   <pet>sheila</pet>
   <pet>ron</pet>
  </person>
  <person>
   <pet>rover</pet>
  </person>
 </people>
</CF_XMLDatasource>

<!--- This query goes through fine --->
<cf_XMLQuery datasource="MyDatasource" name="people">
 //person
</cf_XMLQuery>

<CF_XMLDatasource Name="MyDatasource2">
 <people>
  <person>
   <pet>rover</pet>
  </person>
  <person>
   <pet>sheila</pet>
   <pet>ron</pet>
  </person>
 </people>
</CF_XMLDatasource>

<!--- This one doesn't. The problem appears to be that the first person in
the file has only one pet--->
<cftry>
 <cf_XMLQuery datasource="MyDatasource2" name="people">
   //person
 </cf_XMLQuery>
 <cfcatch><cfoutput>second one failed!</cfoutput></cfcatch>
</cftry>


-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml

Reply via email to