Hello Sir,

i am facing problem to read the data from xml file .it generate the
following error:
"The underlying connection was closed: An unexpected error occurred on
a receive. "


This is the code:

        string url="http://maps.google.com/maps/geo?q=WS3
8DD&output=xml&key=ABQIAAAApTJYfWJuCoZ2h8Sn7qX4uhTot9L5Wtk4wt3Tc99Nfh0YCmaRUxT0wI9mduScyvJhrJyuzbYgYTz9RA";
        System.Xml.XmlDataDocument doc = new System.Xml.XmlDataDocument
();

        doc.Load(url);  //throws exception here

        System.Xml.XmlNamespaceManager xsn = new
System.Xml.XmlNamespaceManager(doc.NameTable);

        xsn.AddNamespace("a1", "http://earth.google.com/kml/2.0";);


        System.Xml.XmlNode xNode = null;
        System.Xml.XmlNode xNode1 = null;
        System.Xml.XmlNodeList nodeList =
doc.DocumentElement.SelectNodes("./a1:Response/a1:Placemark", xsn);


        for (int i = 0; i < nodeList.Count; i++)
        {
            xNode = nodeList[i].SelectSingleNode("a1:address",xsn);
            xNode1 = nodeList[i].SelectSingleNode("a1:Point/
a1:coordinates", xsn);
            Response.Write(xNode.InnerText + "__" +
xNode1.InnerText.Substring(0, ((xNode1.InnerText).Length-2)) + "<---
>");
        }



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to