+ bool parsed=false;\r
+ Poco::XML::DOMParser dp;\r
+\r
+ Initialize();\r
+\r
+ try\r
+ {\r
+ Poco::AutoPtr<Poco::XML::Document> doc=dp.parseString(FixCDATA(xml));\r
+ Poco::XML::Element *root=XMLGetFirstChild(doc,"IdentityExport");\r
+ Poco::XML::Element *node=XMLGetFirstChild(root,"Identity");\r
+\r
+ while(node)\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
+\r
+ Poco::XML::Element *text=XMLGetFirstChild(node,"Name");\r
+ if(text)\r
+ {\r
+ if(text->firstChild())\r
+ {\r
+ std::string asdf=text->innerText();\r
+ asdf=text->firstChild()->innerText();\r
+ name=text->firstChild()->getNodeValue();\r
+ }\r
+ }\r
+ text=XMLGetFirstChild(node,"PublicKey");\r
+ if(text)\r
+ {\r
+ if(text->firstChild())\r
+ {\r
+ publickey=text->firstChild()->getNodeValue();\r
+ }\r
+ }\r
+ text=XMLGetFirstChild(node,"PrivateKey");\r
+ if(text)\r
+ {\r
+ if(text->firstChild())\r
+ {\r
+ privatekey=text->firstChild()->getNodeValue();\r
+ }\r
+ }\r
+\r
+ singleuse=XMLGetBooleanElement(node,"SingleUse");\r
+ publishtrustlist=XMLGetBooleanElement(node,"PublishTrustList");\r
+ publishboardlist=XMLGetBooleanElement(node,"PublishBoardList");\r
+ publishfreesite=XMLGetBooleanElement(node,"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=XMLGetNextSibling(node,"Identity");\r
+ }\r
+\r
+ parsed=true;\r
+ }\r
+ catch(...)\r
+ {\r
+ }\r
+\r
+ return parsed;\r