%XML_DOC_GETDECLARATION

Get the declaration for an XML document

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %XML_DOC_GETDECLARATION(document, declaration[, declaration_name])

Return value

status

One of the following values:

XML_SUCCESS = A nonblank declaration string is returned.

XML_FAIL = A declaration string is not returned successfully.

Arguments

document

The XML document instance to get a declaration for. (XML_DOC_TYPE)

declaration

Returned with the declaration string for the specified XML document instance. The maximum length is 250 characters. (a)

declaration_name

(optional) The name of the declaration to get. (a)

Discussion

A declaration begins with “<?” and ends with “?>”. If declaration_name is not specified, %XML_DOC_GETDECLARATION returns the first declaration for the XML document in declaration.

A sample declaration is as follows:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

This function is defined as ^VAL.

See also

%XML_DOC_ADDDECLARATION routine