0
Passing XML Object to CFC Method
New Here
,
/t5/coldfusion-discussions/passing-xml-object-to-cfc-method/td-p/363823
Jun 03, 2008
Jun 03, 2008
Copy link to clipboard
Copied
I generated an XML Document Object using CFXML and it seems
to work fine until I try to pass it to a CFC method with an
argument type of "xml". The docs say that xml can refer to either
an xml object or xml string; however, when I try to invoke my CFC,
it seems that CF8 is assuming it is an XML string and attempting to
parse it, which fails because it is already parsed! The error is:
An error occured while Parsing an XML document.
Content is not allowed in prolog.
If I do a toString() to start with, it seems to work - so are the docs incorrect? Must "xml" type be an XML string only?
An error occured while Parsing an XML document.
Content is not allowed in prolog.
If I do a toString() to start with, it seems to work - so are the docs incorrect? Must "xml" type be an XML string only?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/coldfusion-discussions/passing-xml-object-to-cfc-method/m-p/363824#M32634
Jun 04, 2008
Jun 04, 2008
Copy link to clipboard
Copied
CF8 is assuming it is an XML string and attempting to parse it,
which fails because it is already parsed!
I don't think that's the cause of the error. There must have been a space or some other character(s) before the XML declaration.
I tested the following example -- successfully.
I don't think that's the cause of the error. There must have been a space or some other character(s) before the XML declaration.
I tested the following example -- successfully.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

