xml:
Expand|Select|Wrap|Line Numbers
- <sitesResponse xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wtr="http://www.cuahsi.org/waterML/" xmlns="http://www.cuahsi.org/waterML/1.0/">
- <queryInfo>
- <criteria />
- </queryInfo>
- <site>
- <siteInfo>
- <siteName>Owasco Lake Buoy</siteName>
- <siteCode network="FLOWEN" siteID="1">Buoy001</siteCode>
- <geoLocation>
- <geogLocation xsi:type="LatLonPointType" srs="EPSG:26918">
- <latitude>42.853289</latitude>
- <longitude>-76.516628</longitude>
- </geogLocation>
- </geoLocation>
- <verticalDatum>NAVD88</verticalDatum>
- <note title="County">Cayuga</note>
- <note title="State">New York</note>
- </siteInfo>
- </site>
- <site>
- <siteInfo>
- <siteName>OwascoInlet</siteName>
- <siteCode network="FLOWEN" siteID="2">Inlet001</siteCode>
- <geoLocation>
- <geogLocation xsi:type="LatLonPointType" srs="EPSG:26918">
- <latitude>42.716106</latitude>
- <longitude>-76.437281</longitude>
- </geogLocation>
- </geoLocation>
- <note title="County">Cayuga</note>
- <note title="State">New York</note>
- </siteInfo>
- </site>
- <site>
- <siteInfo>
- <siteName>DutchHollowBrook</siteName>
- <siteCode network="FLOWEN" siteID="3">DHB001</siteCode>
- <geoLocation>
- <geogLocation xsi:type="LatLonPointType" srs="EPSG:26918">
- <latitude>42.862406</latitude>
- <longitude>-76.510892</longitude>
- </geogLocation>
- </geoLocation>
- <note title="County">Cayuga</note>
- <note title="State">New York</note>
- </siteInfo>
- </site>
- <site>
- <siteInfo>
- <siteName>IAGT Weather Station</siteName>
- <siteCode network="FLOWEN" siteID="4">CAYUMet</siteCode>
- <geoLocation>
- <geogLocation xsi:type="LatLonPointType" srs="EPSG:26918">
- <latitude>42.943528</latitude>
- <longitude>-76.540317</longitude>
- </geogLocation>
- </geoLocation>
- <note title="County">Cayuga</note>
- <note title="State">New York</note>
- </siteInfo>
- </site>
- </sitesResponse>
Expand|Select|Wrap|Line Numbers
- using System;
- using System.Data;
- using System.Configuration;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using System.Collections;
- using System.IO;
- using System.Xml;
- using System.Xml.Serialization;
- /// <summary>
- /// Summary description for ODMSiteList
- /// </summary>
- [XmlRoot("sitesResponse")]
- public class ODMSiteList
- {
- private ArrayList siteList;
- public ODMSiteList()
- {
- siteList = new ArrayList();
- }
- [XmlElement("queryInfo")]
- public ODMQueryInfo query = new ODMQueryInfo();
- [XmlElement("site")]
- public ODMSite[] sites
- {
- get
- {
- ODMSite[] sites = new ODMSite[siteList.Count];
- siteList.CopyTo(sites);
- return sites;
- }
- set
- {
- if (value == null) return;
- ODMSite[] sites = (ODMSite[])value;
- siteList.Clear();
- foreach (ODMSite site in sites)
- siteList.Add(site);
- }
- }
- public int AddItem(Site site)
- {
- return siteList.Add(site);
- }
- }
- public class ODMSite
- {
- [XmlElement("siteinfo")]
- private ODMSiteInfo siteInfoList;
- public ODMSite()
- {
- siteInfoList = new ODMSiteInfo();
- }
- }
- public class ODMSiteInfo
- {
- [XmlElement("sitename")]
- public string SiteName;
- [XmlElement("sitecode")]
- public string SiteCode;
- [XmlElement("geoLocation")]
- public ODMGeoLocation odmGeoLoc;
- [XmlElement("verticalDatum")]
- public string verticalDatum;
- [XmlElement("note")]
- ODMNote[] note;
- public ODMSiteInfo()
- {
- note = new ODMNote();
- }
- }
- public class ODMGeoLocation
- {
- [XmlElement("geogLocation")]
- ODMGeogLocation odmgeog;
- public ODMGeoLocation()
- {
- odmgeog = new ODMGeogLocation();
- }
- }
- public class ODMGeogLocation
- {
- [XmlAttribute("type")]
- public string geogType;
- [XmlAttribute("srs")]
- public string geogSrs;
- [XmlElement("Latitude")]
- public float Latitude;
- [XmlElement("Longitude")]
- public float Longitude;
- public ODMGeogLocation()
- {
- }
- }
- public class ODMNote
- {
- [XmlAttribute("title")]
- public string title;
- public string note;
- public ODMNote()
- {
- }
- }
- public class ODMQueryInfo
- {
- [XmlElement("criteria")]
- public string criteria = string.Empty;
- public ODMQueryInfo()
- {
- }
- }