internal override void Load ()
		{
			Clear ();
			uint count;
			unmanagedNodes.getLength (out count);
			Node[] tmpnodes = new Node[count];
			for (int i = 0; i < count;i++) {
				nsIDOMNode node;
				unmanagedNodes.item ((uint)i, out node);
				ushort type;
				node.getNodeType (out type);
				if (type == (ushort)NodeType.Element)
					tmpnodes[nodeCount++] = new HTMLElement (control, (nsIDOMHTMLElement)node);
			}
			nodes = new Node[nodeCount];
			Array.Copy (tmpnodes, nodes, nodeCount);
		}
		public io.Stream EncodeToStream (HTMLElement element) {
			Init ((Document)element.Owner, MimeType, Flags);
			docEncoder.setNode (element.nodeNoProxy);
			Stream m = new Stream (new io.MemoryStream ());
			docEncoder.encodeToStream (m);
			return m.BaseStream;
		}
		public string EncodeToString (HTMLElement element) {
			Init ((Document)element.Owner, MimeType, Flags);
			docEncoder.setNode (element.nodeNoProxy);
			docEncoder.encodeToString(storage);
			string content = Base.StringGet (storage);
			
			string tag = element.TagName;
			string str = "<" + tag;
			foreach (Mono.WebBrowser.DOM.IAttribute att in element.Attributes) {
				str += " " + att.Name + "=\"" + att.Value + "\"";
			}
			
			str += ">" + content + "</" + tag + ">";
			return str;
		}