I have an XML reader but I receive an error when I'm trying to read the XML from an URL (external source).
This is the code I have ATM:
XmlReader xmlReader = XmlReader.Create("http://dl.bukkit.org/api/1.0/downloads/projects/craftbukkit/view/build-1330/");
while (xmlReader.Read())
{
}
Very simple code, but it returns an error which says:
Data at the root level is invalid. Line 1, position 1.
Any idea?
I can't edit the XML, because it's not mine.
Thanks in advance!
If you use Fiddler to analyze the response returned by the sever, you'll see, that you get JSON instead of XML. You can add a parameter to the URL to get XML:
http://dl.bukkit.org/api/1.0/downloads/projects/craftbukkit/view/build-1330/?format=xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With