0

I have some XML files that contain different function information. I am trying to create a tool that may extract that information from these files once they are created (function name, arguments number, type, returned values, etc.)

Later i will be manipulating these extracted information to create a new XML file. I have limited programming experience and it's all in C++. Any hint for the start would be appreciated.

Evan Mulawski
  • 54,662
  • 15
  • 117
  • 144
Mic Hans
  • 27
  • 1
  • 5

3 Answers3

3

If you just want to be able to read and write XML files, its probably just best to use an XML library rather than reinventing the wheel.

Since its not completely clear what you're trying to do, a good place to start would be this thread: What is the best open XML parser for C++? [Stack Overflow]

It's currently closed but it has a couple good answers that will help you figure out the best library to use for your situation.

If you need more help using it, feel free to edit your question, comment, or post a more specific question on the topic.

Happy coding and good luck!

Community
  • 1
  • 1
pdel
  • 685
  • 12
  • 23
  • Thanks a lot i will read the thread carefully and study the diffrent options availble there. Thanks again for your help – Mic Hans Jun 23 '12 at 23:55
  • You may be interested in marking the question as the answer. You get +2 rep I believe. – pdel Jun 24 '12 at 00:03
2

I would suggest TinyXML, it's small, light-weight and suitable in many cases, it also has a non-viral license.

I used it a lot and it was very useful and ... just in case, there's also TinyXPath.

Diaa Sami
  • 3,249
  • 24
  • 31
0

Unless you are doing this as a project to improve your C++ ability and understanding of XML, I would advise against trying to write the parsing code yourself. You will get much faster results using something out there that is already written and well established and there are a number of choices that are open to you. I personally like RapidXML. It is very simple to add to your code (you just need to #include one or two .hpp files - no libraries are needed) and it does everything that I have needed so far which is mainly parsing data from SOAP responses. The site also provides a comprehensive tutorial which enables you to get up and running very quickly.

mathematician1975
  • 21,161
  • 6
  • 59
  • 101