Parse OFX (Open Financial Exchange document) using Coldfusion

671 Views Asked by At

I searched for quite some time to find examples of Coldfusion parsing OFX files but can't find anything. Can anyone please assist with some sample code or point me in the right direction?

2

There are 2 best solutions below

0
James A Mohler On

I have built a library that parses out ZIP XML files like .docx. You might want to try it out.

First see if you can unzip and read the files

string function extractDocx(required string pathToDocX) {

  cfzip(action="read", file=arguments.pathToDocx, entrypath="word\document.xml", variable="this.xmlString");

  this.xmlPara = xmlparse(this.xmlString).document.body;


  return ReadNode(this.xmlPara);
  }

The result then needs to go to a recursive parser. See:

https://coldfusion.adobe.com/2018/11/extracting-text-html-out-word-docx-files/ https://github.com/jmohler1970/WordExtractor_demo https://github.com/jmohler1970/WordExtractor

0
coldfusionPaul On

Might try the opensource OFX4J java lib.