Searching multiple files for text or phrases?
-
Hi all, i want to search for files containing particular phrase, just like windows "A word or phrase in file:" utility in search option. Does anybody knows any windows API or programming logic for this issue?
-
Hi all, i want to search for files containing particular phrase, just like windows "A word or phrase in file:" utility in search option. Does anybody knows any windows API or programming logic for this issue?
sandeepkavade wrote:
Does anybody knows any windows API or programming logic for this issue?
- Open file 2) Read contents into buffer 3) Search buffer for phrase 4) Close file
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Hi all, i want to search for files containing particular phrase, just like windows "A word or phrase in file:" utility in search option. Does anybody knows any windows API or programming logic for this issue?
-
sandeepkavade wrote:
Does anybody knows any windows API or programming logic for this issue?
- Open file 2) Read contents into buffer 3) Search buffer for phrase 4) Close file
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
They are xml files and i have to search for value of particular node. Reading the file and using MSXML is better option or taking it in CString and calling .find() will be a better option?
modified on Monday, February 11, 2008 11:39 PM
-
They are xml files and i have to search for value of particular node. Reading the file and using MSXML is better option or taking it in CString and calling .find() will be a better option?
modified on Monday, February 11, 2008 11:39 PM
You could always try TinyXml and compare the two approaches. That way you'll know which is the best for your situation.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne