override protected XmlElement CreateHtmlElementSetAsRoot(HtmlAttributes attributes) { XmlElement rv = document.CreateElement("html", "http://www.w3.org/1999/xhtml"); for (int i = 0; i < attributes.Length; i++) { rv.SetAttribute(attributes.GetLocalName(i), attributes.GetURI(i), attributes.GetValue(i)); } document.AppendChild(rv); return(rv); }
protected override void AddAttributesToElement(Element element, HtmlAttributes attributes) { for (int i = 0; i < attributes.Length; i++) { String localName = attributes.GetLocalName(i); String uri = attributes.GetURI(i); if (!element.hasAttributeNS(uri, localName)) { element.setAttributeNS(uri, localName, attributes.GetValue(i)); } } }
override protected void AddAttributesToElement(XmlElement element, HtmlAttributes attributes) { for (int i = 0; i < attributes.Length; i++) { String localName = attributes.GetLocalName(i); String uri = attributes.GetURI(i); if (!element.HasAttribute(localName, uri)) { element.SetAttribute(localName, uri, attributes.GetValue(i)); } } }
protected override Element CreateElement(string ns, string name, HtmlAttributes attributes) { if (OnCreateElement != null) { OnCreateElement(ns, name, attributes); } if (IsDebug) { GlobalLog.Write("Stop in CreateElement", LogChannel.NOTIFY_MSG); waiter.WaitOne(); } Element rv = document.createElementNS(ns, name); for (int i = 0; i < attributes.Length; i++) { rv.setAttributeNS(attributes.GetURI(i), attributes.GetLocalName(i), attributes.GetValue(i)); } return(rv); }