Windows-Phone-Starter-Kit-for-WordPress
Windows-Phone-Starter-Kit-for-WordPress copied to clipboard
XDocument.Load() returning an error
Need to determine cause of this error. It's probably related to the WordPress plugin either not being installed, not activated, or misconfigured/erroring out.
It's definately the plugin as when i point to your site it stops, but when i point to mine is errors out. funny thing is it started working again yesterday but stopped today. Maybe it's related to new posts?
Is there any chance of using JSON rather than RSS on this? I have heard it's quite simple but way above my head.
JSON is an option, but I don't think that it would solve the greater problem. We wanted to use RSS originally because RSS is supported natively through WordPress. We ended up having to create a few custom feeds for other bits of information, but might reconsider how we're doing that to simplify the need to have a plug-in at all.
I just think if your going to use a plugin then may as well use one that enables a more generic feature that will benefit the site more. Right now the RSS thing is throwing this exception anyway so may as well investigate the alternatives. I've been talking to a dev that has some good info on this, should be able to get some help from him. At the very least provde a code branch that gives an option of JSON :)
Idealy not needing a plugin would be where we should be at to enable others that are not self hosted to use the kit. I think this guy i have been talking to could provide some good assistance in exploring the JSON alternative either way :)
Hi Chris, have/will you submit the fixes that we found? It looks like a few peeps are seeing this issue.
I am facing the same issue, I have three versions of WordPress installed on the same server, for 1 word-press version it works for other 2 it doesn't. Can't figure out how to solve it. Please sugest what should be done.
If i open the feed(http://www.mysite.com/?feed=get_recent) in the browser it opens. but in the apps doesn't work
In one case i could solve this error by Added a simple test post in wordpress in one of the categories and it started working, So i am assuming in some cases, the plugin is not able to read the blog post and fails. Not sure what kind of post it is not able to read.
there is a limit to the post size i believe. We solved this with a code change i think that Chris made. It should be in the GITHub.
From: Bhanu [[email protected]] Sent: Thursday, 5 January 2012 3:34 PM To: Nathan Organ Subject: Re: [Windows-Phone-Starter-Kit-for-WordPress] XDocument.Load() returning an error (#1)
In one case i could solve this error by Added a simple test post in wordpress in one of the categories and it started working, So i am assuming in some cases, the plugin is not able to read the blog post and fails. Not sure what kind of post it is not able to read.
Reply to this email directly or view it on GitHub: https://github.com/ChrisKoenig/Windows-Phone-Starter-Kit-for-WordPress/issues/1#issuecomment-3365539
I am using the plugin Version: 1.0.1
Have downloaded the code from here https://github.com/ChrisKoenig/Windows-Phone-Starter-Kit-for-WordPress/downloads still getting the same error
Wordpress Version 3.3.1
I see the same. When i hit the feed=get_Recent in the browser it looks ok as fine XML, but the app crashes with this error:
System.NotSupportedException was unhandled Message=NotSupportedException StackTrace: at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars) at System.Xml.XmlTextReaderImpl.FinishPartialValue() at System.Xml.XmlTextReaderImpl.get_Value() at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r) at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o) at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options) at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options) at System.Xml.Linq.XDocument.Parse(String text) at WordPressStarterKit.Networking.WordPressPlugInReader.<>c__DisplayClass9.<ReadRss>b__7(String results, Exception ex) at WordPressStarterKit.Networking.NetworkWire.<>c__DisplayClass1.<GetStringFromURL>b__0(Object sender, DownloadStringCompletedEventArgs e) at System.Net.WebClient.OnDownloadStringCompleted(DownloadStringCompletedEventArgs e) at System.Net.WebClient.DownloadStringOperationCompleted(Object arg) at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark) at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at System.Delegate.DynamicInvokeOne(Object[] args) at System.MulticastDelegate.DynamicInvokeImpl(Object[] args) at System.Delegate.DynamicInvoke(Object[] args) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority priority) at System.Windows.Threading.Dispatcher.OnInvoke(Object context) at System.Windows.Hosting.CallbackCookie.Invoke(Object[] args) at System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args) at System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)
Ok, just tried to open up the feed=get_Recent in IE, which tries to parse the XML, and it gives me this error.
More information
Reference to undefined entity 'aring'. Line: 16 Character: 46
<item><title>Tip: Tale genkendelse på en Windows Phone 7</title>
Seems lige I have an '&' in one of my headlines, which and XML parser doesn't like. (A side note, this often happens with Wordpress when posting from LiveWriter and are using non-english chars like the danish æ,ø and å).
Just tried to my headline in my post, and now IE validates the XML fine - but sadly the app still throws the same error... :(
Yeah - this is something I need to look at for the parser. Technically, the unescaped & is not valid XML, but I agree that we should do some pre-work to check for this specific situation...
Chris Koenig Senior Developer Evangelist Windows Phone | Technical Evangelism | Microsoft Corporation T: 469-775-2032 M: 214-385-5616 Blog Twitter
-----Original Message----- From: Mads Laumann [mailto:[email protected]] Sent: Wednesday, February 29, 2012 11:29 AM To: Chris Koenig Subject: Re: [Windows-Phone-Starter-Kit-for-WordPress] XDocument.Load() returning an error (#1)
Ok, just tried to open up the feed=get_Recent in IE, which tries to parse the XML, and it gives me this error.
More information
Reference to undefined entity 'aring'. Line: 16 Character: 46
<item><title>Tip: Tale genkendelse på en Windows Phone 7</title>
Seems lige I have an '&' in one of my headlines, which and XML parser doesn't like. (A side note, this often happens with Wordpress when posting from LiveWriter and are using non-english chars like the danish æ,ø and å).
Just tried to my headline in my post, and now IE validates the XML fine - but sadly the app still throws the same error... :(
Reply to this email directly or view it on GitHub: https://github.com/ChrisKoenig/Windows-Phone-Starter-Kit-for-WordPress/issues/1#issuecomment-4244858