Morning all... I have the following XML:
<test xmlns="http://test.server.tld"> <records>1</records> </test> i.e. there is a namespace specified for the XML. This parses as XML fine, but when I do an xmlsearch() it fails: <cfset resSearch = xmlsearch(xmlobj, "//records")> The above should return an array (with a length of 1) containing the XML part for the <records> tag, but it returns an empty array. If I remove the xmlns="..." specified in the root element, I get the expected result. I _can_ use xmlobj.test.records to grab the required part, even if the xmlns is specified. Now I'm guessing that there's something to do with XPath when the namespace is specified -- anyone care to shed some light? The above is a simplification of an XML document that I'm getting back from an external source, therefore I can't change what I'm getting back. Cheers, Tim. ------------------------------------------------------- OUR NEW SITE IS NOW LIVE Visit our new website at http://www.rawnet.com/ and race around the beautiful Bracknell streets at http://xmas.rawnet.com/ ------------------------------------------------------- Tim Blair Web Application Engineer, Rawnet Limited Direct Phone : +44 (0) 1344 393 441 Switchboard : +44 (0) 1344 393 040 ------------------------------------------------------- This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification notwithstanding, any comments, opinions, information or conclusions expressed in this message are those of the originator, not of rawnet limited, unless otherwise explicitly and independently indicated by an authorised representative of rawnet limited. ------------------------------------------------------- -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
