开发者

ColdFusion "Content not allowed in prolog" XML with NO Bom

开发者 https://www.devze.com 2023-03-15 15:42 出处:网络
I\'m having some trouble parsing an XML file with ColdFusion. I\'ve double, triple-checked the file for the BOM, which doesn\'t exist.

I'm having some trouble parsing an XML file with ColdFusion. I've double, triple-checked the file for the BOM, which doesn't exist.

The twist, the code only happens when I use <cfinvoke>. So, on index.cfm

<cfinvoke component='controller.me' method='ADQuery'>
</cfinvok开发者_运维问答e>

Controller/Me.cfc

<cffunction name='ADQuery' output='true'>
<cfset netinfoxml = XMLParse(ExpandPath('conf/netinfo.xml'))>

Then it all goes wrong. However, if I do it directly from index.cfm, and dump it. Then it's fine.

Any ideas?

Sorry, it's probably something incredibly trivial


maybe this will help, seems to be a pretty in depth description [and solution!] to your problem....

http://www.bennadel.com/blog/1206-Content-Is-Not-Allowed-In-Prolog-ColdFusion-XML-And-The-Byte-Order-Mark-BOM-.htm

If not, can you post the xml?

-sean

0

精彩评论

暂无评论...
验证码 换一张
取 消