+A simple example of using XML classes is:
+
+\begin{verbatim}
+wxXmlDocument doc;
+if (!doc.Load(wxT("myfile.xml")))
+ return false;
+
+// start processing the XML file
+if (doc.GetRoot()->GetName() != wxT("myroot-node"))
+ return false;
+
+wxXmlNode *child = doc.GetRoot()->GetChildren();
+while (child) {
+
+ if (child->GetName() == wxT("tag1")) {
+
+ // process text enclosed by <tag1></tag1>
+ wxString content = child->GetNodeContent();
+
+ ...
+
+
+ // process attributes of <tag1>
+ wxString attrvalue1 =
+ child->GetAttribute(wxT("attr1"),
+ wxT("default-value"));
+ wxString attrvalue2 =
+ child->GetAttribute(wxT("attr2"),
+ wxT("default-value"));
+
+ ...
+
+ } else if (child->GetName() == wxT("tag2")) {
+
+ // process tag2 ...
+ }
+
+ child = child->GetNext();
+}
+\end{verbatim}
+
+{\bf Note:} if you want to preserve the original formatting of the loaded file including whitespaces
+and indentation, you need to turn off whitespace-only textnode removal and automatic indentation:
+
+\begin{verbatim}
+wxXmlDocument doc;
+doc.Load(wxT("myfile.xml"), wxT("UTF-8"), wxXMLDOC_KEEP_WHITESPACE_NODES);
+
+// myfile2.xml will be indentic to myfile.xml saving it this way:
+doc.Save(wxT("myfile2.xml"), wxXML_NO_INDENTATION);
+\end{verbatim}
+
+Using default parameters, you will get a reformatted document which in general is different from
+the original loaded content:
+
+\begin{verbatim}
+wxXmlDocument doc;
+doc.Load(wxT("myfile.xml"));
+doc.Save(wxT("myfile2.xml")); // myfile2.xml != myfile.xml
+\end{verbatim}
+
+