Message.AddStringAsXml
Method
Visual Basic
Overloads Public SubAddStringAsXml
(
ByVal fieldName As String,
ByVal fieldValue As String)
Overloads Public SubAddStringAsXml
(
ByVal messageField As MessageField,
ByVal fieldValue As String,
ByVal fieldId As UInt16)
C#
public voidAddStringAsXml
(
string fieldName,
string fieldValue);
public voidAddStringAsXml
(
string fieldName,
string fieldValue,
ushort fieldId);
Purpose
Add a string to a message as the value of an XML field (without parsing it to verify that it specifies a well-formed XML document).
Remarks
When creating an XmlDocument object, .NET parses the data to verify that it specifies well-formed XML. Because such parsing is occasionally inappropriate, this method lets you add XML string data directly into an XML field, compressing its data, without incurring the overhead of parsing the XML string.
Overloading
This method has two overloads. Message.AddStringAsXml Overloads describes their behavior.
Signature |
Description |
|
The overload with two parameters adds a field without an identifier. The first parameter specifies the name of the new field. Fields without identifiers must have non-null names. The second parameter specifies the data. |
|
The overload with three parameters adds a field with an identifier. The first parameter specifies the name of the new field. A field with an identifier may have a null name. The second parameter specifies the data. The third parameter specifies the field identifier. All field identifiers must be unique within each message. Integers in the range [ |