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?
Might try the opensource OFX4J java lib.
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
Related
I have an internal company need to create some sort of application which does the following daily at a specific time:
connects to our company's internal ftp url (not a secure url)
downloads a file with a specific file name
checks the newly downloaded file with the file downloaded the day before
throws an error if the file is the same or else displays a message saying all is good (or sends an email or something with that notification)
That's it. All i need to do is to check and make sure the file on the ftp is different from the day before.
Can anyone recommend an easy way of doing this? I've tried googling for a solution and not quite finding a straight answer.
I've been out of programming for the last 8 years but I still remember visual basic 6.0 and visual c++.
Please guide / suggest as you see fit.
Thank you :)
For vc++:
You could use any ftp client library for downloading a file. Take a look at this SO question which could be useful to you C++ FTP Library? . Then you need a proper way to chech the time. I think your program might need to run at statup and check for the system time at a specific interval if the time is due then download the file. For this you can take alook at this question How to get current time and date in C++? . Finally there are numerous ways for comparing the file and outputing the result, for starters is suggest you use the std.
I tried to build a chatbot in AIML. I downloaded the codes from http://nlp-addiction.com/chatbot/mathbot/ but couldn't get the idea about how to run the program. Please help me.
An AIML file isn't program code, it's a data file (much like any other xml file).
You need to use an interpreter like Program-AB to load and use the file to answer queries.
If you just want to test the contents and formatting of the aiml file, you could use Pandorabots and load the file into a blank bot fairly easily.
Yes, AIML file isn't program code. It's just like a data format. You can learn about it more from here : http://www.alicebot.org/aiml.html
AIML is a data encoding format that tells the bot when to do what to do. Many interpreters can be used to interpret the aiml tags.
One of them is PyAIML which is python based interpreter fairly simple to use.
has anyone of you got some experience with working on zip-archives? I have a programm which searches on a filesystem and searches for keywords in XML files. But the XML files are stored in zip64 archives. So every time I want to search something I have to unzip the files. Since I'm working with Qt the first thing I tried was Quazip but just like libarchive it doesn't seem to support zip64. Than I found libraries like the poco-library or zipstream, but having trouble getting it going.
Now I wanted to ask if anyone can tell how much longer it might take to perform a search on zipped files. Because the search already takes up to 15min. And if it is a lot slower it might not be worth the effort( e.g. if it takes more than 20minutes afterwards I wouldn't use it).
Is it possible to make a prognosis about the additional time to work with the zipped files?
Thanks in advance for any help!
InfoZip supports zip64. However, anyway to search in compressed XML you should decompress them and this takes most of your time.
Hi Guys I need a zip library with which I will be able to validate the file. I would like to read the crc from the zip header using this library and compare it with my own calculated crc. Could you suggest me any??
zlib should be enough. Take a look here: http://zlib.net/manual.html#Checksum
Once upon a time I've used this:
http://zziplib.sourceforge.net/
But nowadays I use my own code, as others suggest.
The format of zip files is very simple, so you don't really need a library to read them. You can find the complete specification for zip files here. It should take you no more than an hour to write some code to locate the zip 'local file header' of interest in the archive and extract the CRC32.
I'm looking for a way if you know the location where to read the text for example say, under a particular category, how would you connect to a website and search & read the text from it?
what steps do i need to follow to learn about that?
you could use libcurl/cURL for your HTML retrival
You're probably looking for a web crawler.
Here's an example of a simple crawler written in C++.
Moreover, you might want to have a look to wget, a software to retrieve files via HTTP, HTTPS and FTP.
if you are looking at a specific web-page, you could try retrieving the page and parsing it to get to the exact location you want. e.g. specific div, etc.
since you are using c++, you could try reading up on using libcurl to retrieve the information you need from the URL.
You can download an html file with WinHTTP(working example) and then search the file. There's some find algos in the std::string class for searching if your needs are relatively basic.