Connector Framework Server 26.3
Connector Framework Server Help

# write_xml

The `write_xml` function writes a document to disk as an XML file. If you specify the name of an existing XML file, the document is appended to the file.

## Syntax

    write_xml( doc, outputFilename )

## Arguments

Argument | Description
--- | ---
`doc` | (LuaDocument) The document to be written to an XML file.
`outputFilename` | (string) The filename of the output XML file.

## Returns

Boolean. Returns `true` if the XML file was created successfully, and `false` otherwise.

## Example

Copy

    1
    2
    3
    function handler(document)
       return write_xml(document, "some_folder/my_xml_file")
    end

Copyright 2026 Open Text
Version 26.3 | Last updated July 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Connector Framework Server 26.3

Topic Title: write_xml