/// <summary> /// Before any doctype - still in the prolog. No declaration /// allowed. /// </summary> /// <param name="token">The consumed token.</param> void BeforeDoctype(XmlToken token) { switch (token.Type) { case XmlTokenType.Doctype: { var doctypeToken = (XmlDoctypeToken)token; var doctypeNode = new DocumentType(_document, doctypeToken.Name) { SystemIdentifier = doctypeToken.SystemIdentifier, PublicIdentifier = doctypeToken.PublicIdentifier }; _document.AppendChild(doctypeNode); _currentMode = XmlTreeMode.Misc; break; } default: { InMisc(token); break; } } }
/// <summary> /// Returns a duplicate of the node on which this method was called. /// </summary> /// <param name="deep"> /// Optional value: true if the children of the node should also be /// cloned, or false to clone only the specified node. /// </param> /// <returns>The duplicate node.</returns> public override INode Clone(Boolean deep = true) { var node = new DocumentType(Owner, Name) { PublicIdentifier = PublicIdentifier, SystemIdentifier = SystemIdentifier, InternalSubset = InternalSubset }; CopyProperties(this, node, deep); return node; }