- TiXmlElement *tr=new TiXmlElement("Identity");\r
- tid->LinkEndChild(tr);\r
- tr->LinkEndChild(XMLCreateCDATAElement("Name",(*i).m_name));\r
- tr->LinkEndChild(XMLCreateTextElement("PublicKey",(*i).m_publickey));\r
- tr->LinkEndChild(XMLCreateTextElement("PrivateKey",(*i).m_privatekey));\r
- tr->LinkEndChild(XMLCreateBooleanElement("SingleUse",(*i).m_singleuse));\r
- tr->LinkEndChild(XMLCreateBooleanElement("PublishTrustList",(*i).m_publishtrustlist));\r
- tr->LinkEndChild(XMLCreateBooleanElement("PublishBoardList",(*i).m_publishboardlist));\r
+ el=doc->createElement("Identity");\r
+ root->appendChild(el);\r
+\r
+ el->appendChild(XMLCreateCDATAElement(doc,"Name",(*i).m_name));\r
+ el->appendChild(XMLCreateTextElement(doc,"PublicKey",(*i).m_publickey));\r
+ el->appendChild(XMLCreateTextElement(doc,"PrivateKey",(*i).m_privatekey));\r
+ el->appendChild(XMLCreateBooleanElement(doc,"SingleUse",(*i).m_singleuse));\r
+ el->appendChild(XMLCreateBooleanElement(doc,"PublishTrustList",(*i).m_publishtrustlist));\r
+ el->appendChild(XMLCreateBooleanElement(doc,"PublishBoardList",(*i).m_publishboardlist));\r
+ el->appendChild(XMLCreateBooleanElement(doc,"PublishFreesite",(*i).m_publishfreesite));\r