Open topic with navigation

TIBCO Rendezvous® 8.7.0

# Message.AddStringAsXml

Method

## Visual Basic

    Overloads Public Sub AddStringAsXml(
        ByVal fieldName As String,
        ByVal fieldValue As String)
    Overloads Public Sub AddStringAsXml(
        ByVal messageField As MessageField,
        ByVal fieldValue As String,
        ByVal fieldId As UInt16)

## C#

    public void AddStringAsXml(
        string fieldName,
        string fieldValue);
    public void AddStringAsXml(
        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.

Message.AddStringAsXml Overloads

Signature | Description
``fieldName,````fieldValue`` | 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.
``fieldName,````fieldValue,````fieldId`` | 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 [`1`, `65535`] are valid arguments for this parameter.

## See Also

Message.GetXmlAsString

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2023. Cloud Software Group, Inc. All Rights Reserved.