Also, here is the code for my web service:

[WebMethod]
    [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
    public XmlDocument GetXmlDocument(string Text)
    {
        CompanyDataTableAdapters.CompanyTableAdapter da = new
CompanyDataTableAdapters.CompanyTableAdapter();
        CompanyData.CompanyDataTable dt = da.GetCompanyFromName
(Text);

        StringBuilder xml = new StringBuilder();
        XmlWriter xmlWrite = XmlWriter.Create(xml);

        using (XmlWriter writer = XmlWriter.Create(xml))
        {
            writer.WriteStartDocument();
            writer.WriteStartElement("Markers");

            foreach (CompanyData.CompanyRow r in dt.Rows)
            {
                writer.WriteStartElement("Marker");

                writer.WriteElementString("Lat", r.Latitiude.ToString
());
                writer.WriteElementString("Lng", r.Longitude.ToString
());
                writer.WriteElementString("Name",
r.CompanyName.ToString());

                writer.WriteEndElement();
            }
            writer.WriteEndElement();
            writer.WriteEndDocument();
        }

        XmlDocument xmlDoc = new XmlDocument();
        xmlDoc.LoadXml(xml.ToString());
        return xmlDoc;
    }
--~--~---------~--~----~------------~-------~--~----~
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