System.Xml.XmlWriter.WriteProcessingInstruction C# (CSharp) Method

WriteProcessingInstruction() public abstract method

public abstract WriteProcessingInstruction ( string name, string text ) : void
name string
text string
return void
        public abstract void WriteProcessingInstruction(string name, string text);

Usage Example

Example #1
0
        public void WriteResponseMessage ( XmlWriter writer, string innerXml, NuxleusAsyncResult asyncResult ) {

            using (writer) {
                writer.WriteStartDocument();
                if (m_responseType == ResponseType.REDIRECT) {
                    writer.WriteProcessingInstruction("xml-stylesheet", "type='text/xsl' href='/service/transform/openid-redirect.xsl'");
                }
                writer.WriteStartElement("auth");
                writer.WriteAttributeString("xml:base", "http://dev.amp.fm/");
                writer.WriteAttributeString("status", m_status);
                if (m_responseType == ResponseType.REDIRECT) {
                    writer.WriteElementString("url", "http://dev.amp.fm/");
                }
                if (m_responseType == ResponseType.QUERY_RESPONSE && innerXml != null) {
                    writer.WriteStartElement("response");
                    writer.WriteRaw(innerXml);
                    writer.WriteEndElement();
                }
                writer.WriteEndElement();
                writer.WriteEndDocument();
            }

            asyncResult.CompleteCall();

        }
All Usage Examples Of System.Xml.XmlWriter::WriteProcessingInstruction