summaryrefslogtreecommitdiffstats
path: root/common/eurephia_xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/eurephia_xml.c')
-rw-r--r--common/eurephia_xml.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/eurephia_xml.c b/common/eurephia_xml.c
index 91eacf4..0dc42ae 100644
--- a/common/eurephia_xml.c
+++ b/common/eurephia_xml.c
@@ -236,6 +236,22 @@ xmlNode *eurephiaXML_getRoot(eurephiaCTX *ctx, xmlDoc *doc, const char *nodeset,
/**
+ * Checks if the given XML document is an eurephia ResultMsg XML document
+ *
+ * @param ctx eurephiaCTX
+ * @param resxml XML document to validate
+ *
+ * @return Returns 1 if the input XML document is a ResultMsg document. Otherwise 0
+ */
+unsigned int eurephiaXML_IsResultMsg(eurephiaCTX *ctx, xmlDoc *resxml) {
+ xmlNode *node = NULL;
+
+ assert( (ctx != NULL) && (resxml != NULL) );
+ node = eurephiaXML_getRoot(ctx, resxml, "Result", 1);
+ return (node != NULL ? 1 : 0);
+}
+
+/**
* Parses an eurephia Result XML document
*
* @param ctx eurephiaCTX