#include
Using namespace STD.
# include "tinyxml. H"
Void parseXml (TiXmlNode * node) {for (TiXmlElement * nodeEle=node - & gt; FirstChildElement (); NodeEle!=nullptr; NodeEle=nodeEle - & gt; NextSiblingElement ()) {TiXmlNode * tempEle=nodeEle; If (nodeEle - & gt; The GetText ()!=NULL) {string tag=nodeEle - & gt; The Value (); The string content=nodeEle - & gt; GetText (); Cout & lt; <"Tag:" & lt;
{string strfile; Cout & lt; <"The input XML file name:"; Cin & gt;> Strfile; TiXmlDocument doc (strfile c_str ()); If (doc. LoadFile ()) {parseXml (doc) RootElement ()); } the else cout & lt; <"No XML found!!!!!! "& lt;