configTranslate

Converts an old Lucee XML configuration (lucee-server.xml or lucee-web.xml.cfm) to the .CFConfig.json format.

configTranslate(source [, target] [, type] [, mode] [, charset]) → returns struct

This function requires Lucee 6.0.0.460 and up.  Not supported on Adobe ColdFusion, etc.

Argument Reference

source string
Required

The path to the XML file, the XML itself, or server or web to use the old XML file in that context's directory.

target string

The path to write the CFConfig.json file to, or server or web to write it to that context's directory. When omitted, the result is only returned.

type string
Default: server

The config context: server or web.

mode string

Whether the result is for single or multi mode. Only used when type is server.

charset string

The charset used to read the XML file.

Examples
Sample code invoking the configTranslate function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub