I've jsut started using tinyxml and have a few questions/queries:
- TiXmlDocument::LoadFile() fails when fed with an XML element that contains duplicate attributes, and it's difficult to figure out what's wrong:
<table type="input" path="vhf.input" type="event">
Do you think we can improve error handling here?
- Many functions return "const char *" and I end up constructing std::string whenever I wanna do something with the result besides storing:
assert(std::string(pnode->Value()) == "table");
Would you be interested in adding/modifying these methods to return strings by instance?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've jsut started using tinyxml and have a few questions/queries:
- TiXmlDocument::LoadFile() fails when fed with an XML element that contains duplicate attributes, and it's difficult to figure out what's wrong:
<table type="input" path="vhf.input" type="event">
Do you think we can improve error handling here?
- Many functions return "const char *" and I end up constructing std::string whenever I wanna do something with the result besides storing:
assert(std::string(pnode->Value()) == "table");
Would you be interested in adding/modifying these methods to return strings by instance?
- On the first point, did GetErrorRow() and GetErrorColumn() return the correct values?
- On the 2nd, that's because of the STL switch. For STL on you would like:
string Foo()
but of course, for STL off you need:
const char* Foo()
...but there's no way to overload, so it uses the const char* way and relies on an implicit cast.
lee