public static Element GetConfig( Element element, string tag )
		{
			if ( element.ChildElements.Count > 0 ) 
			{
				foreach( Element child in element.ChildElements ) 
				{
					if ( child.TagName == tag )
						return child;
				}
			}
			return null;
		}
		public Element Parse( XmlTextReader reader ) 
		{
			Element element = null;

			while ( !reader.EOF )
			{
				reader.Read();            
				switch ( reader.NodeType )
				{
					case XmlNodeType.Element :					
						element = new Element( reader.LocalName );
						m_CurrentElement = element;                  
						if ( m_Elements.Count == 0 ) 
						{
							m_RootElement = element;
							m_Elements.Push( element );
						}
						else 
						{                  
							Element parent = (Element)m_Elements.Peek();
							parent.ChildElements.Add( element );

							if ( reader.IsEmptyElement )
								break;
							else 
								m_Elements.Push( element );
						}
						if ( reader.HasAttributes ) 
						{
							while( reader.MoveToNextAttribute() ) 
							{
								m_CurrentElement.setAttribute( reader.Name, reader.Value );
							}
						}
						break;
					case XmlNodeType.Attribute :
						element.setAttribute( reader.Name, reader.Value );
						break;
					case XmlNodeType.EndElement :
						m_Elements.Pop();
						break;
					case XmlNodeType.Text :
						m_CurrentElement.Text = reader.Value;
						break;
					case XmlNodeType.CDATA :
						m_CurrentElement.Text = reader.Value;
						break;
					default :
						// ignore
						break;
				}
			}
			return m_RootElement;
		}
		public DOMParser() 
		{
			m_Elements = new Stack();
			m_CurrentElement = null;
			m_RootElement = null;
		}
		public void Add( Element element ) 
		{
			List.Add( element );
		}