Open topic with navigation

TIBCO Rendezvous® 8.8.0

# Message.GetXmlAsString

Method

## Visual Basic

    Overloads Public Function GetXmlAsString(
        ByVal fieldName As String)
    Overloads Public Function GetXmlAsString(
        ByVal fieldName As String,
        ByVal fieldId As UInt16)
    Public Function GetXmlAsStringByIndex(
        ByVal fieldIndex As UInt32
    ) As String

## C#

    public String GetXmlAsString(
        string fieldName);
    public String GetXmlAsString(
        string fieldName,
        ushort fieldId);
    public String GetXmlAsStringByIndex(
        uint fieldIndex)

## Purpose

Get an XML field from a message, and return its value as a string (without parsing to verify that it specifies a well-formed XML document).

## Remarks

When Message.GetField gets the value of an XML field, it creates an XmlDocument data object; in the process, .NET parses the data to verify that it specifies well-formed XML. Because such parsing is occasionally inappropriate, this method gets an XML field, uncompresses its data, and returns it as a string—without parsing it.

The semantics of finding a field within a message are identical to the method Message.GetField; for a complete description, see Field Search Algorithm.

``fieldName`` | Get a field with this name.
``fieldId`` | Get the field with this identifier. The constant `MessageField.NoSpecificId` (zero) is a special value; it indicates the absence of any identifier to the field search algorithm.
``fieldIndex`` | Get the field with this index. Zero specifies the first field. See also Message.GetFieldByIndex.

## See Also

Message.AddStringAsXml

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-2025. Cloud Software Group, Inc. All Rights Reserved.