| 5655 | } |
| 5656 | |
| 5657 | PUGI__FN const char* xml_parse_result::description() const |
| 5658 | { |
| 5659 | switch (status) |
| 5660 | { |
| 5661 | case status_ok: return "No error"; |
| 5662 | |
| 5663 | case status_file_not_found: return "File was not found"; |
| 5664 | case status_io_error: return "Error reading from file/stream"; |
| 5665 | case status_out_of_memory: return "Could not allocate memory"; |
| 5666 | case status_internal_error: return "Internal error occurred"; |
| 5667 | |
| 5668 | case status_unrecognized_tag: return "Could not determine tag type"; |
| 5669 | |
| 5670 | case status_bad_pi: return "Error parsing document declaration/processing instruction"; |
| 5671 | case status_bad_comment: return "Error parsing comment"; |
| 5672 | case status_bad_cdata: return "Error parsing CDATA section"; |
| 5673 | case status_bad_doctype: return "Error parsing document type declaration"; |
| 5674 | case status_bad_pcdata: return "Error parsing PCDATA section"; |
| 5675 | case status_bad_start_element: return "Error parsing start element tag"; |
| 5676 | case status_bad_attribute: return "Error parsing element attribute"; |
| 5677 | case status_bad_end_element: return "Error parsing end element tag"; |
| 5678 | case status_end_element_mismatch: return "Start-end tags mismatch"; |
| 5679 | |
| 5680 | default: return "Unknown error"; |
| 5681 | } |
| 5682 | } |
| 5683 | |
| 5684 | PUGI__FN xml_document::xml_document() : |
| 5685 | _buffer(0) |