| 282 | } |
| 283 | |
| 284 | void Document::Expat::character_data_handler(void* data, const XML_Char* chars, int len) |
| 285 | { |
| 286 | Document* doc = static_cast<Document*>(data); |
| 287 | |
| 288 | Node* nod = doc->root; |
| 289 | |
| 290 | for (int i = 1; i < doc->m_depth; ++i) |
| 291 | { |
| 292 | nod = &(nod->children.back()); |
| 293 | } |
| 294 | |
| 295 | int x = 0, y = len - 1; |
| 296 | |
| 297 | while (isspace(chars[y]) && y > 0) --y; |
| 298 | while (isspace(chars[x]) && x < y) ++x; |
| 299 | |
| 300 | nod->cdata = std::string(chars, x, y + 1); |
| 301 | } |
| 302 | |
| 303 | void Document::Expat::end_element_handler(void* data, const XML_Char* /*name*/) |
| 304 | { |
nothing calls this directly
no outgoing calls
no test coverage detected