parseCFDocument
fn
CfDocument parseCFDocument(string source, string filename = "",
CfParserConfig config = CfParserConfig.init) @safeParses 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
source | The CF source text to parse |
filename | Optional filename for error reporting |
config | Optional parser configuration |
Returns
A CfDocument representing the parsed CF source.
Throws
CfParseException if the source contains syntax errors.