Re: parsing rss feed in Coldfusion

2012-12-05 Thread fun and learning

Thanks for the reply. It was happening because the feed has ' ', in some of 
the entries. I am just using replace function to replace it with 'and '

 I think it might be a white space problem. Ben Nadel wrote a helpful 
 blog about it sometime ago http://www.bennadel.
com/blog/1206-Conten 
t-Is-Not-Allowed-In-Prolog-ColdFusion-XML-And-The-Byte-Order-Mark-BOM-.
 htm
 
 Matt
 
 Sent from my iPhone
 
 On 4 Dec 2012, at 21:45, fun and learning funandlrnn...@gmail.com 
 wrote:
 
  
  Hi All -
  
  I am trying to parse a wordpress feed in Coldfusion. Below is the 
 code I have.
  
  cfhttp url=http://test.com/feed/; result=objGet/cfhttp
  
  The result dump works fine
  cfdump var=#objGet#
  
  The problem is when parsing the XML.
  cfset xmlResult = XmlParse(objGet.FileContent) /
  
  I get this error An error occured while Parsing an XML document. The 
 entity name must immediately follow the '' in the entity reference. I 
 tried using XMLFormat to escape special characters, but I get this 
 error when I use XMLFormat - An error occured while Parsing an XML 
 document. Reference is not allowed in prolog 
  
  Any suggestions on how to fix this? 
  
  

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353367
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


parsing rss feed in Coldfusion

2012-12-04 Thread fun and learning

Hi All -

I am trying to parse a wordpress feed in Coldfusion. Below is the code I have.

cfhttp url=http://test.com/feed/; result=objGet/cfhttp

The result dump works fine
cfdump var=#objGet#

The problem is when parsing the XML.
cfset xmlResult = XmlParse(objGet.FileContent) /

 I get this error An error occured while Parsing an XML document. The entity 
name must immediately follow the '' in the entity reference. I tried using 
XMLFormat to escape special characters, but I get this error when I use 
XMLFormat - An error occured while Parsing an XML document. Reference is not 
allowed in prolog 

Any suggestions on how to fix this? 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353361
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


parsing rss feed in Coldfusion

2012-12-04 Thread fun and learning

Hi All -

I am trying to parse a wordpress feed in Coldfusion. Below is the code I have.

cfhttp url=http://test.com/feed/; result=objGet/cfhttp

The result dump works fine
cfdump var=#objGet#

The problem is when parsing the XML.
cfset xmlResult = XmlParse(objGet.FileContent) /

 I get this error An error occured while Parsing an XML document. The entity 
name must immediately follow the '' in the entity reference. I tried using 
XMLFormat to escape special characters, but I get this error when I use 
XMLFormat - An error occured while Parsing an XML document. Reference is not 
allowed in prolog 

Any suggestions on how to fix this? 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353362
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: parsing rss feed in Coldfusion

2012-12-04 Thread Matthew

I think it might be a white space problem. Ben Nadel wrote a helpful blog about 
it sometime ago 
http://www.bennadel.com/blog/1206-Content-Is-Not-Allowed-In-Prolog-ColdFusion-XML-And-The-Byte-Order-Mark-BOM-.htm

Matt

Sent from my iPhone

On 4 Dec 2012, at 21:45, fun and learning funandlrnn...@gmail.com wrote:

 
 Hi All -
 
 I am trying to parse a wordpress feed in Coldfusion. Below is the code I have.
 
 cfhttp url=http://test.com/feed/; result=objGet/cfhttp
 
 The result dump works fine
 cfdump var=#objGet#
 
 The problem is when parsing the XML.
 cfset xmlResult = XmlParse(objGet.FileContent) /
 
 I get this error An error occured while Parsing an XML document. The entity 
 name must immediately follow the '' in the entity reference. I tried using 
 XMLFormat to escape special characters, but I get this error when I use 
 XMLFormat - An error occured while Parsing an XML document. Reference is not 
 allowed in prolog 
 
 Any suggestions on how to fix this? 
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353363
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: parsing rss feed in Coldfusion

2012-12-04 Thread Matt Quackenbush

Try trim() on objGet.FileContent to fix the prolog error. As for the ,
it sounds like you're consuming a bad feed. Not sure what to tell you there.


On Tue, Dec 4, 2012 at 3:43 PM, fun and learning funandlrnn...@gmail.comwrote:


 Hi All -

 I am trying to parse a wordpress feed in Coldfusion. Below is the code I
 have.

 cfhttp url=http://test.com/feed/; result=objGet/cfhttp

 The result dump works fine
 cfdump var=#objGet#

 The problem is when parsing the XML.
 cfset xmlResult = XmlParse(objGet.FileContent) /

  I get this error An error occured while Parsing an XML document. The
 entity name must immediately follow the '' in the entity reference. I
 tried using XMLFormat to escape special characters, but I get this error
 when I use XMLFormat - An error occured while Parsing an XML document.
 Reference is not allowed in prolog

 Any suggestions on how to fix this?

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353364
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: parsing rss feed in Coldfusion

2012-12-04 Thread Raymond Camden

Um, any reason why you aren't using CFFEED?


On Tue, Dec 4, 2012 at 3:51 PM, Matt Quackenbush quackfu...@gmail.comwrote:


 Try trim() on objGet.FileContent to fix the prolog error. As for the ,
 it sounds like you're consuming a bad feed. Not sure what to tell you
 there.


 On Tue, Dec 4, 2012 at 3:43 PM, fun and learning funandlrnn...@gmail.com
 wrote:

 
  Hi All -
 
  I am trying to parse a wordpress feed in Coldfusion. Below is the code I
  have.
 
  cfhttp url=http://test.com/feed/; result=objGet/cfhttp
 
  The result dump works fine
  cfdump var=#objGet#
 
  The problem is when parsing the XML.
  cfset xmlResult = XmlParse(objGet.FileContent) /
 
   I get this error An error occured while Parsing an XML document. The
  entity name must immediately follow the '' in the entity reference. I
  tried using XMLFormat to escape special characters, but I get this error
  when I use XMLFormat - An error occured while Parsing an XML document.
  Reference is not allowed in prolog
 
  Any suggestions on how to fix this?
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353365
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm