1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-16 23:07:05 +01:00

Added JSON parser (without NextElement)

This commit is contained in:
Guido Cossu
2017-01-23 14:57:38 +00:00
parent 27dfe816fa
commit 244f8fb6dc
10 changed files with 12731 additions and 30 deletions

View File

@ -72,11 +72,13 @@ XmlReader::XmlReader(const string &fileName)
bool XmlReader::push(const string &s)
{
node_ = node_.child(s.c_str());
if (node_ == NULL)
if (node_.child(s.c_str()) == NULL )
return false;
node_ = node_.child(s.c_str());
return true;
}
void XmlReader::pop(void)
@ -87,15 +89,16 @@ void XmlReader::pop(void)
bool XmlReader::nextElement(const std::string &s)
{
if (node_.next_sibling(s.c_str()))
{
node_ = node_.next_sibling(s.c_str());
return true;
}
{
node_ = node_.next_sibling(s.c_str());
return true;
}
else
{
return false;
}
{
return false;
}
}
template <>