?????????main.cpp???????????????????Щ????????????????????????????
????TiXmlDocument??????????Xml???????????????????????
????TiXmlElement*???????????
????TiXmlHandle??????????????TiXmlElement?????????
????FirstChild("nodeName")????????????“nodeName”??????
????NextSiblingElement()???????????????????????????????
????QueryIntAttribute("attributeName"??&var)?????????????attributeName?????????int????????var????
????GetText()????????????????????????????<node>text</node>?е?text
????OK???????????Щ??????????????????????Xml????????????xml???????????
????<instance>
????<network>
????<nodes>
????<nodeid="0"type="0">
????<cx>40.0</cx>
????<cy>50.0</cy>
????</node>
????<!--??N+1????????node???-->
????</nodes>
????</network>
????.....
????</instance>
???????????????????id??????x??y??????Customer?????С?
????1.??????????????????hDoc???????????????????"instance"??
????TiXmlElement*pElem;//??????????
????pElem=hDoc.FirstChildElement().Element();//???????
????TiXmlHandlehRoot(pElem);//hRoot??????
?????????"instance"???????????????????????pElem=hDoc.FirstChildElement().Element()??????????pElem???"instance"??hRoot??pElem?????????
????2.???????????????“node”????У??????????????????????????????????????????“node”??????????nodeElem:
????TiXmlElement*nodeElem=hRoot.FirstChild("network").FirstChild("nodes").FirstChild("node").Element();//????????node???
????????id?????"node"????????"id"?У?
????nodeElem->QueryIntAttribute("id"??&temp1);//??id???temp1?У??????????
???????????x??y???????“node”????????"cx"??"cy"??????(text)?У????????????????????
????TiXmlElement*xElem=node.FirstChild("cx").Element();//cx???
????temp2=atof(xElem->GetText());//char?float
????????atof???<stdlib>?У??????char????????????????
???????1??2???????????????????“node”????id??x??y????????????У????????????????е?????????
????for(nodeElem;nodeElem;nodeElem=nodeElem->NextSiblingElement()){
????......
????}
????????requests????μ?startTime??endTime??quantity??serviceTime?????????????????????ο?main.cpp????
???????н?????£?

???????
??????????????Xml????????????
????????????????????????У?
??????????????????????QueryIntAttribute???????????
?????????????????????????getText()?????????
?????????????????????????????NextSiblingElement()???????????????????
????????
????????????????????ζ??Xml????????????д??Xml???????ο?tinyXml????????????????????????????
????????????????????????????????