public void WriteEndProcessingInstruction() {
Debug.Assert(this.xstate == XmlState.WithinPI, "WriteEndProcessingInstruction cannot be called in the " + this.xstate + " state.");
Writer.WriteProcessingInstruction(this.piTarget, this.piText);
this.xstate = XmlState.WithinContent;
this.depth--;
// Xml state transitions
if (this.depth == 0)
EndTree();
}