/// <summary> /// Creates an XmlElement. /// </summary> /// <param name="prefix">The prefix of the new element (if any). String.Empty and a null reference (Nothing in Visual Basic) are equivalent.</param> /// <param name="localname">The local name of the new element.</param> /// <param name="namespaceuri">The namespace URI of the new element (if any). String.Empty and a null reference (Nothing in Visual Basic) are equivalent.</param> /// <returns>The new XmlElement.</returns> public override XmlElement CreateElement(string prefix, string localname, string namespaceuri) { LineInfoElement elem = new LineInfoElement(prefix, localname, namespaceuri, this); IXmlLineInfo lineInfo = this.reader as IXmlLineInfo; if (lineInfo != null && lineInfo.HasLineInfo()) { elem.SetLineInfo(lineInfo.LineNumber, lineInfo.LinePosition); } return elem; }
/// <summary> /// Creates an XmlElement. /// </summary> /// <param name="prefix">The prefix of the new element (if any). String.Empty and a null reference (Nothing in Visual Basic) are equivalent.</param> /// <param name="localname">The local name of the new element.</param> /// <param name="namespaceuri">The namespace URI of the new element (if any). String.Empty and a null reference (Nothing in Visual Basic) are equivalent.</param> /// <returns>The new XmlElement.</returns> public override XmlElement CreateElement(string prefix, string localname, string namespaceuri) { LineInfoElement elem = new LineInfoElement(prefix, localname, namespaceuri, this); IXmlLineInfo lineInfo = this.reader as IXmlLineInfo; if (lineInfo != null && lineInfo.HasLineInfo()) { elem.SetLineInfo(lineInfo.LineNumber, lineInfo.LinePosition); } return(elem); }