public static XhtmlTagNameTabel SingularCreator() { if (tabel == null) { tabel = new XhtmlTagNameTabel(); } return(tabel); }
/// <summary> /// 初始化本类型,对外不公开 /// </summary> /// <param name="localName">节点本地名</param> protected virtual void InitializeComponent(string localName) { XhtmlTagNameTabel tagNameTabel = XhtmlTagNameTabel.SingularCreator(); this.AsXmlNode = new XmlDocument(tagNameTabel); string name = localName.ToLower(CultureInfo.CurrentCulture); this.DocumentXhtmlElement = this.OwnerPage.CreateXhtmlTag(name); this.AppendChild(this.DocumentXhtmlElement); this.Attributes = new XhtmlAttributeCollection(this); //XmlElement documentElement = ((XmlDocument)this.AsXmlNode).CreateElement(localName.ToLower(CultureInfo.CurrentCulture)); //((XmlDocument)this.AsXmlNode).AppendChild(documentElement); }