示例#1
0
文件: way.cs 项目: zainGohar/osm2shp
        internal virtual void ReadXml(XmlElement xmlParent)
        {
	          if ( xmlParent.Attributes != null )
			      {
                foreach ( XmlAttribute xmlAttribute in xmlParent.Attributes )
		            {
			              switch ( xmlAttribute.Name )
					          {
						          
						            case "id" :
							              _id = Convert.ToInt32(xmlAttribute.Value);
							              break;
						          
						            case "timestamp" :
							              _timestamp = Convert.ToDateTime(xmlAttribute.Value);
							              break;
						          
						            case "visible" :
							              _visible = xmlAttribute.Value;
							              break;
						          
						            case "action" :
							              _action = xmlAttribute.Value;
							              break;

                                    case "deleted":
                                          _deleted = Convert.ToBoolean(xmlAttribute.Value);
                                          break;
  						
						            default:
                                        break;
							              //throw new ApplicationException(this.GetType().Name + " - Unknown attribute : " + xmlAttribute.Name);
                    }
                }
            }
		   
		        foreach ( XmlNode xmlNode in xmlParent.ChildNodes )
		        {
				        if ( xmlNode.NodeType == XmlNodeType.Element )
				        {
					          switch ( xmlNode.Name )
					          {
					            
						            case "nd" :
							              nd itemnd = new nd();
							              itemnd.ReadXml(xmlNode as XmlElement);
							              _ndCollection.Add(itemnd);
							              break;
					            
						            case "tag" :
							              tag itemtag = new tag();
							              itemtag.ReadXml(xmlNode as XmlElement);
							              _tagCollection.Add(itemtag);
							              break;
					            
  						
						            default:
                                        break;
							            //throw new ApplicationException(this.GetType().Name + " - Unknown element : " + xmlNode.Name);
                    }
				        }
				      
		        }
      }
示例#2
0
        internal virtual void ReadXml(XmlElement xmlParent)
        {
	          if ( xmlParent.Attributes != null )
			      {
                foreach ( XmlAttribute xmlAttribute in xmlParent.Attributes )
		            {
			              switch ( xmlAttribute.Name )
					          {
						          
						            case "id" :
							              _id = Convert.ToUInt64(xmlAttribute.Value);
							              break;
						          
						            case "timestamp" :
							              _timestamp = Convert.ToDateTime(xmlAttribute.Value);
							              break;
						          
						            case "visible" :
							              _visible = xmlAttribute.Value;
							              break;
						          
						            case "action" :
							              _action = xmlAttribute.Value;
							              break;

                                    case "deleted":
                                          _deleted = Convert.ToBoolean(xmlAttribute.Value);
                                          break;
  						
						            default:
                                        break;
							              //throw new ApplicationException(this.GetType().Name + " - Unknown attribute : " + xmlAttribute.Name);
                    }
                }
            }
		   
		        foreach ( XmlNode xmlNode in xmlParent.ChildNodes )
		        {
				        if ( xmlNode.NodeType == XmlNodeType.Element )
				        {
					          switch ( xmlNode.Name )
					          {
					            
						            case "nd" :
							              nd itemnd = new nd();
							              itemnd.ReadXml(xmlNode as XmlElement);
							              _ndCollection.Add(itemnd);
							              break;
					            
						            case "tag" :
							              tag itemtag = new tag();
							              itemtag.ReadXml(xmlNode as XmlElement);
							              _tagCollection.Add(itemtag);
							              break;
					            
  						
						            default:
                                        break;
							            //throw new ApplicationException(this.GetType().Name + " - Unknown element : " + xmlNode.Name);
                    }
				        }
				      
		        }
      }
示例#3
0
文件: nd.cs 项目: zainGohar/osm2shp
		    public void Add(nd item)
		    {
			      _list.Add(item);
		    }
示例#4
0
文件: nd.cs 项目: zainGohar/osm2shp
		    public void Remove(nd item)
		    {
			      _list.Remove(item);
		    }
示例#5
0
 public void Remove(nd item)
 {
     _list.Remove(item);
 }
示例#6
0
 public void Add(nd item)
 {
     _list.Add(item);
 }