Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lee 1117 posts 3051 karma points
    May 05, 2010 @ 10:35
    Lee
    0

    Anyone Else Getting XML Entity Error?

    Seems this is a problem with the Twitter XML?  Two sites both using the twitter plugin get this error

    An error occurred while parsing EntityName. Line 207, position 68.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.Xml.XmlException: An error occurred while parsing EntityName. Line 207, position 68.

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace: 

    [XmlException: An error occurred while parsing EntityName. Line 207, position 68.]
       System.Xml.XmlTextReaderImpl.Throw(Exception e) +95
       System.Xml.XmlTextReaderImpl.ParseEntityName() +168
       System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr) +5031894
       System.Xml.XmlTextReaderImpl.ParseAttributes() +916
       System.Xml.XmlTextReaderImpl.ParseElement() +378
       System.Xml.XmlTextReaderImpl.ParseElementContent() +199
       System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) +229
       System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) +61
       System.Xml.XmlDocument.Load(XmlReader reader) +134
       System.Web.UI.WebControls.XmlDataSource.PopulateXmlDocument(XmlDocument document, CacheDependency& dataCacheDependency, CacheDependency& transformCacheDependency) +376
       System.Web.UI.WebControls.XmlDataSource.GetXmlDocument() +205
       System.Web.UI.WebControls.XmlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +38
       System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +255
       System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +68
       System.Web.UI.WebControls.Repeater.EnsureDataBound() +65
       System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +20
       System.Web.UI.Control.PreRenderRecursiveInternal() +108
       System.Web.UI.Control.PreRenderRecursiveInternal() +224
       System.Web.UI.Control.PreRenderRecursiveInternal() +224
       System.Web.UI.Control.PreRenderRecursiveInternal() +224
       System.Web.UI.Control.PreRenderRecursiveInternal() +224
       System.Web.UI.Control.PreRenderRecursiveInternal() +224
       System.Web.UI.Control.PreRenderRecursiveInternal() +224
       System.Web.UI.Control.PreRenderRecursiveInternal() +224
       System.Web.UI.Control.PreRenderRecursiveInternal() +224
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394
  • Lee Kelleher 3888 posts 14667 karma points MVP 9x admin c-trib
    May 05, 2010 @ 10:41
    Lee Kelleher
    0

    Hey Lee, what are the Twitter usernames (or RSS feeds?)  Any clues in the XML of the feed?

  • Lee 1117 posts 3051 karma points
    May 05, 2010 @ 10:49
  • Lee Kelleher 3888 posts 14667 karma points MVP 9x admin c-trib
    May 05, 2010 @ 11:29
    Lee Kelleher
    1

    Hi Lee, it's the URL for Google (source link) in the last tweet/item.  It contains an unescaped ampersand &, which has invalided the XML document.

    Either Google or Twitter should encode their XML entities properly.

    For now, only thing I can think of is either reduce the number of tweets by 1 (so the last one drops off), or do some new tweets (so the last one drops off) ... after that, don't tweet from Google (until they've sorted this out).

    OR ... write some RegEx-based RSS parser? (Which is a truly awful idea!) ;-P

    Cheers, Lee.

  • Lee 1117 posts 3051 karma points
    May 05, 2010 @ 17:20
    Lee
    0

    Hmmm well thats strange?  Its been like that for ages, so something must have changed with Twitter as it has been fine for months :S

    Thanks fella for the tip though :)

  • Warren Buckley 2085 posts 4523 karma points MVP 6x admin hq c-trib
    May 06, 2010 @ 09:34
    Warren Buckley
    0

    Wow.
    Only seen this thread in my RSS reader this morning and it looks like it has kinda been solved already.
    Do I need to do any fixes to my codebase or not?

    Warren :)

  • Lee Kelleher 3888 posts 14667 karma points MVP 9x admin c-trib
    May 06, 2010 @ 11:02
    Lee Kelleher
    0

    @Warren, no problem - happy to help.  It's not your code, no need to worry.

    @Lee, just want to confirm which package you are using... Warren's Twitter for Umbraco or your own Simple Tweets? As I believe Warren's code is using the Twitter API XML and yours is using the RSS feed ... and as far as I can tell, this entity name issue should only effect the RSS feed ... if that makes sense?

    Cheers, Lee.

Please Sign in or register to post replies

Write your reply to:

Draft