%XML_DOC_REMOVEDECLARATION

Remove a declaration from an XML document

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
status = %XML_DOC_REMOVEDECLARATION(document, declaration_name)

Return value

status

One of the following values:

XML_SUCCESS = The declaration is removed successfully.

XML_FAIL = The declaration is not removed successfully.

Arguments

document

The XML document instance from which to remove a declaration. (XML_DOC_TYPE)

declaration_name

The name of the declaration to remove. (a)

Discussion

This function is defined as ^VAL.

Note

You cannot remove the xml declaration of the form <?xml version=’version’...?>.

Examples

The following example removes the declaration named xml-stylesheet from the document (in other words, the one that starts with “<?xml-stylesheet...?>”).

status = %xml_doc_removedeclaration(docid, "xml-stylesheet")