I'm working on my program where I would import an XML file and scan for parser state (also Element, line number, content).
Right now, I have all the elements and line numbers stored in vector
s of string
and integer
.
My question is, how can I scan for an attribute which at the end I would be able to indicate the root, children, and direct children? I have tried using <map>
but still no clue.
Here are some examples:
Output will be
It would be easy if I used additional libraries but I would like to use the standard C/C++ library only.