Was having some issues with XML validation on CF20...
# adobe
c
Was having some issues with XML validation on CF2021 post update 20 and it seems there is a new argument for
xmlValidate
that is not documented - anyone know where i might find what
parseroptions
might take? CF throws the following on an invalid argument to xmlValidate now: The Valid Parameter for function XMLVALIDATE are [xml, validator, parseroptions]
FYI - docs are on the wrong function, parseXML. the options are
Copy code
,parseroptions = {
					allowExternalEntities = true,
					entityExpansionLimit = 2000
			    }
b
I haven't used
xmlValidate()
of late. But I remember it having just the first 2 arguments. I also remember that
parserOptions
was introduced for
xmlParse()
and
isXML()
. That said, I can now see that the documentation for xmlValidate() mentions a third argument,
allowExternalEntities
, a boolean. This boolean is a key in the struct
parserOptions
. For more on
parserOptions
, see the documentation for xmlParse().
c
allowExternalEntities throws an error on xmlvalidate
b
Hi @chris_hopkins, sorry about the duplication. Saw your reply only after posting. I am not surprised that you get an error. That one XML function accepts a struct as argument, and another a key from the struct, seems to me to be buggy design.
Did you get the message "The Valid Parameter for function XMLVALIDATE are [xml, validator, parseroptions]" when you used
xmlValidate(xml, validator)
? If so, can you share the stacktrace?
c
only when i accidentaly made a typo when using named arguments
b
Ah, thanks. It's worth reporting a bug though.