Whatever message this page gives is out now! Go check it out!

registerCustomParser

Last update:
May 18, 2026
Registers a custom document parser for a user-defined file extension, enabling load() to handle file formats not natively supported by ColdFusion's built-in parsers.

Syntax

docService.registerCustomParser(type, config)

Parameters

Parameter
Type
Required
Description
type
String
Required
Identifier or file extension for this parser (for example, "myformat").
config
Struct
Required
A Struct with two keys: parserClass (String , fully qualified Java class name implementing DocumentParser); extensions (Array of file extensions that this parser handles, for example ["myf", "myd"]).

Returns

Returns void.

Example

docService.registerCustomParser("myformat", {
    parserClass: "com.example.parsers.MyCustomParser",
    extensions:  ["myf", "myd"]
});

// After registration, load() will invoke MyCustomParser for *.myf and *.myd files
docs = docService.load({ path: "./data/", recursive: true });

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page