/// <summary> /// Creates a new XmlDocumentType object. /// </summary> /// <param name="name">Name of the document type.</param> /// <param name="publicId">The public identifier of the document type or a null reference (Nothing in Visual Basic).</param> /// <param name="systemId">The system identifier of the document type or a null reference (Nothing in Visual Basic).</param> /// <param name="internalSubset">The DTD internal subset of the document type or a null reference (Nothing in Visual Basic).</param> /// <returns>The new XmlDocumentType.</returns> public override XmlDocumentType CreateDocumentType(string name, string publicId, string systemId, string internalSubset) { LineInfoDocumentType tdt = new LineInfoDocumentType(name, publicId, systemId, internalSubset, this); IXmlLineInfo lineInfo = this.reader as IXmlLineInfo; if (lineInfo != null && lineInfo.HasLineInfo()) { tdt.SetLineInfo(lineInfo.LineNumber, lineInfo.LinePosition); } return tdt; }
/// <summary> /// Creates a new XmlDocumentType object. /// </summary> /// <param name="name">Name of the document type.</param> /// <param name="publicId">The public identifier of the document type or a null reference (Nothing in Visual Basic).</param> /// <param name="systemId">The system identifier of the document type or a null reference (Nothing in Visual Basic).</param> /// <param name="internalSubset">The DTD internal subset of the document type or a null reference (Nothing in Visual Basic).</param> /// <returns>The new XmlDocumentType.</returns> public override XmlDocumentType CreateDocumentType(string name, string publicId, string systemId, string internalSubset) { LineInfoDocumentType tdt = new LineInfoDocumentType(name, publicId, systemId, internalSubset, this); IXmlLineInfo lineInfo = this.reader as IXmlLineInfo; if (lineInfo != null && lineInfo.HasLineInfo()) { tdt.SetLineInfo(lineInfo.LineNumber, lineInfo.LinePosition); } return(tdt); }