44 #ifdef CHECK_MEMORY_LEAKS
46 #endif // CHECK_MEMORY_LEAKS
55 const std::string& file)
56 : myParentHandler(0), myParentIndicator(
SUMO_TAG_NOTHING), myFileName(file) {
58 while (tags[i].key != terminatorTag) {
59 myTagMap.insert(TagMap::value_type(tags[i].str, tags[i].key));
63 while (attrs[i].key != terminatorAttr) {
93 size_t len = name.length();
94 XMLCh* ret =
new XMLCh[len + 1];
96 for (; i < len; i++) {
97 ret[i] = (XMLCh) name[i];
107 const XMLCh*
const qname,
108 const Attributes& attrs) {
128 const XMLCh*
const qname) {
138 char* buf =
new char[len + 1];
150 }
catch (std::runtime_error&) {
184 TagMap::const_iterator i =
myTagMap.find(tag);
194 std::ostringstream buf;
195 char* pMsg = XMLString::transcode(exception.getMessage());
196 buf << pMsg << std::endl;
197 buf <<
" In file '" <<
getFileName() <<
"'" << std::endl;
198 buf <<
" At line/column " << exception.getLineNumber() + 1
199 <<
'/' << exception.getColumnNumber() <<
"." << std::endl;
200 XMLString::release(&pMsg);