My Project
Loading...
Searching...
No Matches
XmlParser.h
Go to the documentation of this file.
1#pragma once
2
3#include <Arduino.h>
4
5// Class used to retrieve attribute values from an XML string.
7{
8 public:
9 // Tries to read the specified string attribute from the given Xml message.
10 // Returns a boolean value indicating whether the read was successful.
11 static bool tryReadCharAttr(const char *xmlMessage, const char *attr, char **returnValue);
12
13 // Tries to read the specified boolean attribute from the given Xml message.
14 // Returns a boolean value indicating whether the read and parsing was successful.
15 static bool tryReadBoolAttr(const char *xmlMessage, const char *attr, bool *returnValue);
16
17 // Tries to read the specified int attribute from the given Xml message.
18 // Returns a boolean value indicating whether the read and parsing was successful.
19 static bool tryReadIntAttr(const char *xmlMessage, const char *attr, int *returnValue);
20
21 private:
22 static bool tryParseBool(const char *item, bool *returnValue);
23 static bool tryParseInt(const char *item, int *returnValue);
24};
Definition XmlParser.h:7
static bool tryReadCharAttr(const char *xmlMessage, const char *attr, char **returnValue)
Definition XmlParser.cpp:8
static bool tryReadBoolAttr(const char *xmlMessage, const char *attr, bool *returnValue)
Definition XmlParser.cpp:62
static bool tryReadIntAttr(const char *xmlMessage, const char *attr, int *returnValue)
Definition XmlParser.cpp:75