XML + C++ = pain/headache/distasteful/unenjoyable/annoying and so on...
I'm using Xerces-C++ as my C++ parser, and using DOM (Document Object Model) to parse my XML file.
It takes about 10 sloc to 20 sloc with my custom reusable functions just to get a piece of the data from the DOM element tree.
It's painful!!
Also the XML schema that I'm working on is fairly complicated. There's about 500 fields defined, some are string, some are long, some are sequence of string, some are booleans, and some are enumeration.
All right, done with my complain. If anyone has any information on how to efficiently parse the DOM tree, please let me know.
I don't think I did it incorrectly, but maybe there's better way.
I'm using Xerces-C++ as my C++ parser, and using DOM (Document Object Model) to parse my XML file.
It takes about 10 sloc to 20 sloc with my custom reusable functions just to get a piece of the data from the DOM element tree.
It's painful!!
Also the XML schema that I'm working on is fairly complicated. There's about 500 fields defined, some are string, some are long, some are sequence of string, some are booleans, and some are enumeration.
All right, done with my complain. If anyone has any information on how to efficiently parse the DOM tree, please let me know.
I don't think I did it incorrectly, but maybe there's better way.