WriteProcessingInstruction()

XmlWriter::WriteProcessingInstruction(String, String) method

When overridden in a derived class, writes out a processing instruction with a space between the name and text as follows: <?name text?>.

virtual void System::Xml::XmlWriter::WriteProcessingInstruction(String name, String text)=0

Arguments

ParameterTypeDescription
nameStringThe name of the processing instruction.
textStringThe text to include in the processing instruction.

Exceptions

ExceptionDescription
ArgumentExceptionThe text would result in a non-well formed XML document. name is either nullptr or String::Empty.

Remarks

This method is being used to create an XML declaration after XmlWriter::WriteStartDocument has already been called.

See Also