internal void SetReferencedEntityContent() { if (FirstChild != null) { return; } if (OwnerDocument.DocumentType == null) { return; } XmlEntity ent = Entity; if (ent == null) { InsertBefore(OwnerDocument.CreateTextNode(String.Empty), null, false, true); } else { for (int i = 0; i < ent.ChildNodes.Count; i++) { InsertBefore(ent.ChildNodes [i].CloneNode(true), null, false, true); } } }
private void ImportFromDTD() { entities = new XmlNamedNodeMap(this); notations = new XmlNamedNodeMap(this); foreach (DTDEntityDeclaration decl in DTD.EntityDecls.Values) { XmlNode n = new XmlEntity(decl.Name, decl.NotationName, decl.PublicId, decl.SystemId, OwnerDocument); entities.SetNamedItem(n); } foreach (DTDNotationDeclaration decl in DTD.NotationDecls.Values) { XmlNode n = new XmlNotation(decl.LocalName, decl.Prefix, decl.PublicId, decl.SystemId, OwnerDocument); notations.SetNamedItem(n); } }