|
Mailing Lists
|
Home /
Groups /
XML
ColdFusion 8 problem with xmlsearch or malformed xml ?? access 2003 exported xml
Two things:Dominic Watson 05/21/08 02:33 P Sweet. The // did it !! Thanks a bunch !!Bob Bell 05/21/08 02:41 P 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 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 -----
|
May 20, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||