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:
@ -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 <>
|
||||
|
Reference in New Issue
Block a user