| 194 | } |
| 195 | |
| 196 | bool Base::XMLReader::read() |
| 197 | { |
| 198 | ReadType = None; |
| 199 | |
| 200 | try { |
| 201 | parser->parseNext(token); |
| 202 | } |
| 203 | catch (const XMLException& toCatch) { |
| 204 | |
| 205 | char* message = XMLString::transcode(toCatch.getMessage()); |
| 206 | std::string what = message; |
| 207 | XMLString::release(&message); |
| 208 | throw Base::XMLBaseException(what); |
| 209 | } |
| 210 | catch (const SAXParseException& toCatch) { |
| 211 | |
| 212 | char* message = XMLString::transcode(toCatch.getMessage()); |
| 213 | std::string what = message; |
| 214 | XMLString::release(&message); |
| 215 | throw Base::XMLParseException(what); |
| 216 | } |
| 217 | catch (...) { |
| 218 | throw Base::XMLBaseException("Unexpected XML exception"); |
| 219 | } |
| 220 | return true; |
| 221 | } |
| 222 | |
| 223 | void Base::XMLReader::readElement(const char* ElementName) |
| 224 | { |
no test coverage detected