Hi, this is great, thanks.
I do have a couple of suggestions. I have also written a simple XML document parser in C++, and it's very similar to yours but I also have extended functions for getting / setting attributes /contents as different data types - makes life simpler when coming to use the library.
ie. node.GetIntData() / node.SetIntData()
node.GetFloatData() / nodeSetFloatData()
node.GetTextData() / node.SetTextData()
Also, the biggest difference is that I translate xml escape codes for markup characters... so,
SetData() would convert the following characters
< becomes <
> becomes >
" becomes "
' becomes '
& becomes &
also, non printables become
&#nn; (where nn is the ascii code)
GetData() then retranslates those &xxxx; type codes back into the actual characters.
I do have a couple of suggestions. I have also written a simple XML document parser in C++, and it's very similar to yours but I also have extended functions for getting / setting attributes /contents as different data types - makes life simpler when coming to use the library.
ie. node.GetIntData() / node.SetIntData()
node.GetFloatData() / nodeSetFloatData()
node.GetTextData() / node.SetTextData()
Also, the biggest difference is that I translate xml escape codes for markup characters... so,
SetData() would convert the following characters
< becomes <
> becomes >
" becomes "
' becomes '
& becomes &
also, non printables become
&#nn; (where nn is the ascii code)
GetData() then retranslates those &xxxx; type codes back into the actual characters.