parseCFDocument

fnCfDocument parseCFDocument(string source, string filename = "", CfParserConfig config = CfParserConfig.init) @safe

Parses a CF source string into a CfDocument.

This is the document model API that preserves all metadata for roundtrip fidelity. Use this when you need to modify and reserialize a CF file while preserving formatting, comments, and structure.

Parameters

sourceThe CF source text to parse
filenameOptional filename for error reporting
configOptional parser configuration

Returns

A CfDocument representing the parsed CF source.

Throws

CfParseException if the source contains syntax errors.