Throws an error if the next element is not what it expects
| 644 | |
| 645 | // Throws an error if the next element is not what it expects |
| 646 | void Ilvis2MetadataReader::assertElementIs(xmlNodePtr node, std::string expected) |
| 647 | { |
| 648 | if (!node || !nodeElementIs(node, expected)) |
| 649 | throw error("Expected element '" + expected + "', found '" + |
| 650 | std::string((const char *)node->name) + "'"); |
| 651 | } |
| 652 | |
| 653 | |
| 654 | // Throws an error if the node is not null |