House of Fusion
Home of the ColdFusion Community

Search xml

November 23, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
             1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30             

Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  XML

ColdFusion 8 problem with xmlsearch or malformed xml ?? access 2003 exported xml

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Two things:
Dominic Watson
05/21/08 02:33 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dominic Watson
05/21/2008 02:33 PM

Two things: 1. xml is case sensitive so the 'id' in the XPath expression should be 'ID'. 2. A single slash to start an XPath expression basically says 'start at the root', so '/Media_x0020_Contacts' does not match any elements (there is no Media_x0020_Contacts element in the *root* of the document. Either use a double slash to say 'match a Media_x0020_Contacts element anywhere in the document' or write the full path to the element. So: <cfset contacts = XMLSearch(xml,'//Media_x0020_Contacts/ID') /> or <cfset contacts = XMLSearch(xml,'/dataroot/Media_x0020_Contacts/ID') /> I'd ignore the validation errors ;) HTH Dominic -- Blog it up: http://fusion.dominicwatson.co.uk

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Bob Bell
05/21/2008 02:41 PM

Sweet.  The // did it !!   Thanks a bunch !! On Wed, May 21, 2008 at 1:31 PM, Dominic Watson < watson.dominic@googlemail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists