LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2011, 01:15 AM   #1
abhinay.krs
LQ Newbie
 
Registered: May 2007
Posts: 1

Rep: Reputation: 0
Unhappy searching a particular file and parsing it


I want a code in C++ that searches for all .h files and parses it
that is get function names and their return types and write them in XML format.
 
Old 11-06-2011, 02:52 AM   #2
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
Why in c++ and not in bash or perl or other scripting language?
A combination of grep, sed and awk in a script would probably do the trick.

You may want to post a .h extract and the .xml that it would generate.
 
Old 11-06-2011, 09:42 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by abhinay.krs View Post
I want a code in C++ that searches for all .h files and parses it that is get function names and their return types and write them in XML format.
Then please write one. We aren't going to write your code for you, but will be more than happy to HELP you work through problems you may have. And when asking for help, you need to provide details...in this case, SAMPLES of what you are looking for, since we can't guess.

If you tried to look any of these component elements up, you'd find them. How to find a string in C++
http://www.cplusplus.com/reference/string/string/find/

C++ class to output XML
http://www.codeproject.com/KB/stl/simple_xmlwriter.aspx
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching content of the file using File Browser Nautilus susja Linux - Newbie 4 05-28-2011 06:25 PM
Searching .txt file for (specific) strings and printing them to new file Hb_Kai Linux - General 7 02-18-2010 09:09 AM
(Debian) xorg.conf file, (EE) Problem parsing the config file unclerick94 Linux - Newbie 1 07-28-2009 02:27 PM
Reading/Wirting file/parsing xml file using javascript fakhrul Programming 1 08-14-2007 05:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration