Skip to content

Instantly share code, notes, and snippets.

@Zoramite
Created June 1, 2011 23:21
Show Gist options
  • Save Zoramite/1003586 to your computer and use it in GitHub Desktop.
Save Zoramite/1003586 to your computer and use it in GitHub Desktop.
Railo XMLSearch with xmlns attribute test
<cfset tests = [
xmlParse('<?xml version="1.0"?> <html><body><ul><li>foo</li><li>bar</li></ul></body></html>'),
xmlParse('<?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml"><body><ul><li>foo</li><li>bar</li></ul></body></html>')
] />
<cfloop array="#tests#" index="i">
<cfset results = xmlSearch(i, '/html/body/ul/li') />
<cfdump var="#results#" />
</cfloop>
@ykcop
Copy link

ykcop commented Jul 9, 2020

cfdump var=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment