WhitePages Web Developer Portal Forums

Bugs & Features

RSS Feed

can't get it to work in c# and .net

    • ahager
    • Topic created 5 years ago

    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

  1. ahager5 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 ":".

  2. Dan_WhitePages5 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

  3. Rob Chartier4 years ago

    http://www.codeplex.com/whitepages

[ Page 1 of 1 ]