-\r
- //TiXmlDocument td;\r
- //td.Parse(xml.c_str());\r
-/*\r
- if(!td.Error())\r
- {\r
- std::string name;\r
- std::string publickey;\r
- std::string privatekey;\r
- bool singleuse=false;\r
- bool publishtrustlist=false;\r
- bool publishboardlist=false;\r
- bool publishfreesite=false;\r
- TiXmlText *txt;\r
- TiXmlHandle hnd(&td);\r
- TiXmlNode *node;\r
-\r
- Initialize();\r
-\r
- node=hnd.FirstChild("IdentityExport").FirstChild("Identity").ToElement();\r
- while(node)\r
- {\r
- name="";\r
- publickey="";\r
- privatekey="";\r
- singleuse=false;\r
- publishtrustlist=false;\r
- publishboardlist=false;\r
- publishfreesite=false;\r
-\r
- TiXmlHandle hnd2(node);\r
- txt=hnd2.FirstChild("Name").FirstChild().ToText();\r
- if(txt)\r
- {\r
- name=txt->ValueStr();\r
- }\r
- txt=hnd2.FirstChild("PublicKey").FirstChild().ToText();\r
- if(txt)\r
- {\r
- publickey=txt->ValueStr();\r
- }\r
- txt=hnd2.FirstChild("PrivateKey").FirstChild().ToText();\r
- if(txt)\r
- {\r
- privatekey=txt->ValueStr();\r
- }\r
-\r
- singleuse=XMLGetBooleanElement(node->ToElement(),"SingleUse");\r
- publishtrustlist=XMLGetBooleanElement(node->ToElement(),"PublishTrustList");\r
- publishboardlist=XMLGetBooleanElement(node->ToElement(),"PublishBoardList");\r
- publishfreesite=XMLGetBooleanElement(node->ToElement(),"PublishFreesite");\r
-\r
- if(name!="" && publickey!="" && privatekey!="")\r
- {\r
- m_identities.push_back(identity(name,publickey,privatekey,singleuse,publishtrustlist,publishboardlist,publishfreesite));\r
- }\r
- \r
- node=node->NextSibling("Identity");\r
- }\r
- return true;\r
-\r
- }\r
- else\r
- {\r
- return false;\r
- }\r
-*/\r