NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlContainer.AddPI

Adds a new processing instruction node to the child list of this element.

[Visual Basic]
Public Function AddPI( _
   ByVal name As String, _
   ByVal text As String _
) As XmlPI
[C#]
public XmlPI AddPI(
   string name,
   string text
);
[C++]
public: XmlPI* AddPI(
   String* name,
   String* text
);
[JScript]
public function AddPI(
   name : String,
   text : String
) : XmlPI;

Parameters

name
The name of the processing instruction.
text
The text of the processing instruction.

Return Value

The newly created processing instruction node.

Exceptions

Exception Type Condition
ArgumentException If name does not start with a '?' character or if text contains the character sequence "?>".

Remarks

The name of the processing instruction must start with a '?' character. An exception is thrown if text contains the caracter sequence "?>" in any position (that sequence is reserved to indicate the end of a processing instruction).

See Also

XmlContainer Class | XmlContainer Members | System.Xml Namespace