#include#include "Xml.h" int main() { const char* xmlString = " "; Xml xml(xmlString, Xml::PT_STRIP_WHITESPACE); xml.setTo("parent"); Xml child; while (xml.getNextChild(child)) { std::cout << "Found child element: " << child.getElementName() << std::endl; } return 0; }
#includeThis example uses Xml getNextChild with a specific element name to navigate to the "child2" element within the "parent" element. Package library: This example is using the Xml library.#include "Xml.h" int main() { const char* xmlString = " "; Xml xml(xmlString, Xml::PT_STRIP_WHITESPACE); if (xml.setTo("parent")) { Xml child; if (xml.getNextChild(child, "child2")) { std::cout << "Found child2 element!" << std::endl; } } return 0; }