I declared a local xml document in my code and am trying to load the ducument based on the url and am getting an error. XmlDocument xl = new XmlDocument(); xl.LoadXml("http://api.whitepages.com/find_person/1.0/?firstname=" + FirstName + ";lastname=" + LastName + ";state=co;api_key=2a0855fcc973eee564e979216bfde9f7"); System.Xml.XmlException was unhandled Message="Data at the root level is invalid. Line 1, position 1." Source="System.Xml" LineNumber=1 LinePosition=1 SourceUri="" Please help!
Message edited by ahager 4 years ago
ahager – 5 years ago
I got it to work but now I am getting a different error because the xml string is not well formed. The element names contain a ":".
Dan_WhitePages – 5 years ago
Ahager, The element name includes a namespace. Some parsers get confused, but it really is well formed. http://www.w3.org/TR/REC-xml-names/#Conformance
Rob Chartier – 4 years ago
http://www.codeplex.com/whitepages
Please sign in to add a post.
I declared a local xml document in my code and am trying to load the ducument based on the url and am getting an error.
XmlDocument xl = new XmlDocument();
xl.LoadXml("http://api.whitepages.com/find_person/1.0/?firstname=" + FirstName + ";lastname=" + LastName + ";state=co;api_key=2a0855fcc973eee564e979216bfde9f7");
System.Xml.XmlException was unhandled
Message="Data at the root level is invalid. Line 1, position 1."
Source="System.Xml"
LineNumber=1
LinePosition=1
SourceUri=""
Please help!
Message edited by ahager 4 years ago
ahager – 5 years ago
I got it to work but now I am getting a different error because the xml string is not well formed. The element names contain a ":".
Dan_WhitePages – 5 years ago
Ahager,
The element name includes a namespace. Some parsers get confused, but it really is well formed.
http://www.w3.org/TR/REC-xml-names/#Conformance
Rob Chartier – 4 years ago
http://www.codeplex.com/whitepages