internal XmlAttribute(System.Xml.XmlName name, XmlDocument doc) : base(doc) { base.parentNode = null; if (!doc.IsLoading) { XmlDocument.CheckName(name.Prefix); XmlDocument.CheckName(name.LocalName); } if (name.LocalName.Length == 0) { throw new ArgumentException(Res.GetString("Xdom_Attr_Name")); } this.name = name; }
internal XmlElement(System.Xml.XmlName name, bool empty, XmlDocument doc) : base(doc) { base.parentNode = null; if (!doc.IsLoading) { XmlDocument.CheckName(name.Prefix); XmlDocument.CheckName(name.LocalName); } if (name.LocalName.Length == 0) { throw new ArgumentException(Res.GetString("Xdom_Empty_LocalName")); } this.name = name; if (empty) { this.lastChild = this; } }