[GCC-XML] gccxml parsing help

Mahesh V maheshvenkateshwaran at gmail.com
Fri Jan 3 06:49:21 EST 2014


Hello Good Folks,

I am a newbie.

Would you please point me to a python sample code which can parse the xml
output file generated using gccxml?

I have a .h file (c programming language) as shown below
#ifndef _TEST_TYPE_DEF_H_
#define _TEST_TYPE_DEF_H_
typedef enum {
    TYPE_THING_A,
    TYPE_THING_B,
} ncfg_test_type_thing_t;
typedef struct {
    test_type_thing_t thing;
    int val;
    int with_cheese;
} test_type_t;
#endif // _TEST_TYPE_DEF_H_

I parsed it using the gccxml with the following command
gccxml  def.h -fxml=./aaa.xml

The resultant xml file is huge and I am lost in getting the file parsed.
what I need is names of the types (test_type_t is a struct, val is int,
with_cheese is int) etc as output. Any pointers will be helpful.

thanks
Mahesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20140103/7aa0d3c0/attachment.html>


More information about the gccxml mailing list