Tuesday, April 30, 2013

Invalid URI: The Uri string is too long with XmlDocument

When you get:
Invalid URI: The Uri string is too long

on XmlDocument while loading xml from string make sure you use:
XmlDocument.LoadXml(string)
"Loads the XML document from the specified string."


 and not
XmlDocument.Load(string)
"Loads the XML document from the specified URL."