if (e) {
const XMLCh* val = e->getAttributeNS(ns, localName);
if (val && *val) {
- int i = XMLString::parseInt(val);
- if (i)
- return i;
+ try {
+ return XMLString::parseInt(val);
+ }
+ catch (XMLException&) {
+ }
}
}
return defValue;
ostream& xmltooling::operator<<(ostream& ostr, const XMLObject& obj)
{
- return ostr << *(obj.marshall());
+ try {
+ return ostr << *(obj.marshall());
+ }
+ catch (DOMException& ex) {
+ auto_ptr_char msg(ex.getMessage());
+ throw XMLParserException(msg.get());
+ }
}