Skip to main content
September 9, 2008
Question

xml error

  • September 9, 2008
  • 2 replies
  • 285 views
I am calling this XMLvalidate function and getting error message instead of returing FALSE. Any idea.. Thanks
<cfcomponent>
<cffunction
name = "xml_validate"
returntype="string"
output = "yes"
access = "remote">
<cfset myResults=XMLValidate("#xml#","/c/www/test.xsd/")>
<cfif #myResults.status# neq 'YES'>
<cfset myResults ="FALSE">
<cfelse>
<cfset myResults ="TRUE">
</cfif>
<cfreturn #myResults#>
</cffunction>
</cfcomponent>
This topic has been closed for replies.

2 replies

Inspiring
September 10, 2008
> getting error message

It would help a great deal if you didn't keep us guessing as to what the
error message says.

--
Adam
Inspiring
September 9, 2008
Nick201 wrote:
> Any idea..

What is in the 'XML' variable and where is it set. I do not see it
being set inside the function.

P.S. You do not need to use quotes and pounds like that. You can just
use string variables in any function parameter that expects a string.
I.E. <cfset myResults = XMLValidate(xml,"/c/www/test.xsd")>