XML Document element traversal

Allows traversing an xml document by element without needing to know the element name
Blind traversal allows more dynamic loading of xml docs and logic to wrap different outcomes

new script functions:
prevElement
nextElement
nextChildElement

<main> <--- we are here
  <child> <-- nextChildElement will take us here
  </child>
  <child2> <-- after nextChildElement nextElement will take us here
  </child2>
</main>
<main2> <-- next element will bring us here
</main2>
This commit is contained in:
marauder2k7 2025-11-15 17:42:02 +00:00
parent 7e64493dbf
commit c53d79a8cf
2 changed files with 101 additions and 0 deletions

View file

@ -132,6 +132,12 @@ class SimXMLDocument: public SimObject
void addData(const char* text);
// Retrieve data from the current level.
const char* getData();
bool prevElement();
bool nextElement();
bool nextChildElement();
private:
// Document.