summary refs log tree commit diff stats
path: root/src/xml.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-04-21 14:50:52 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-04-21 14:50:52 -0400
commit8142a9c87a13cecc7a3698e877f24d89f128c074 (patch)
treecbee6ae85c5c674dd313c7cfe1420477ee55ca95 /src/xml.cpp
parent0f70db34d9b47de55b00c558ac3c445f30b7b6a5 (diff)
downloadtherapy-proto-objs.tar.gz
therapy-proto-objs.tar.bz2
therapy-proto-objs.zip
Started working on prototype objects proto-objs
Diffstat (limited to 'src/xml.cpp')
-rw-r--r--src/xml.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/xml.cpp b/src/xml.cpp new file mode 100644 index 0000000..f6f60ea --- /dev/null +++ b/src/xml.cpp
@@ -0,0 +1,13 @@
1#include "xml.h"
2#include <stdexcept>
3
4xmlChar* getProp(xmlNodePtr node, const char* attr)
5{
6 xmlChar* key = xmlGetProp(node, reinterpret_cast<const xmlChar*>(attr));
7 if (key == nullptr)
8 {
9 throw std::invalid_argument("Error parsing XML file");
10 }
11
12 return key;
13}