/// <summary> /// Creates an XmlProcessingInstruction with the specified name and data. /// </summary> /// <param name="target">The name of the processing instruction.</param> /// <param name="data">The data for the processing instruction.</param> /// <returns>The new XmlProcessingInstruction.</returns> public override XmlProcessingInstruction CreateProcessingInstruction(string target, string data) { LineInfoProcessingInstruction pi = new LineInfoProcessingInstruction(target, data, this); IXmlLineInfo lineInfo = this.reader as IXmlLineInfo; if (lineInfo != null && lineInfo.HasLineInfo()) { pi.SetLineInfo(lineInfo.LineNumber, lineInfo.LinePosition); } return(pi); }
/// <summary> /// Creates an XmlProcessingInstruction with the specified name and data. /// </summary> /// <param name="target">The name of the processing instruction.</param> /// <param name="data">The data for the processing instruction.</param> /// <returns>The new XmlProcessingInstruction.</returns> public override XmlProcessingInstruction CreateProcessingInstruction(string target, string data) { LineInfoProcessingInstruction pi = new LineInfoProcessingInstruction(target, data, this); IXmlLineInfo lineInfo = this.reader as IXmlLineInfo; if (lineInfo != null && lineInfo.HasLineInfo()) { pi.SetLineInfo(lineInfo.LineNumber, lineInfo.LinePosition); } return pi; }