1 #include "../../include/freenet/identityintroductionxml.h"
\r
2 #include "../../include/freenet/freenetssk.h"
\r
8 IdentityIntroductionXML::IdentityIntroductionXML()
\r
13 std::string IdentityIntroductionXML::GetXML()
\r
16 TiXmlDeclaration *tdec=new TiXmlDeclaration("1.0","UTF-8","");
\r
20 td.LinkEndChild(tdec);
\r
21 tid=new TiXmlElement("IdentityIntroduction");
\r
22 td.LinkEndChild(tid);
\r
24 tid->LinkEndChild(XMLCreateCDATAElement("Identity",m_identity));
\r
27 return std::string(tp.CStr());
\r
30 void IdentityIntroductionXML::Initialize()
\r
35 const bool IdentityIntroductionXML::ParseXML(const std::string &xml)
\r
39 td.Parse(xml.c_str());
\r
44 TiXmlHandle hnd(&td);
\r
48 txt=hnd.FirstChild("IdentityIntroduction").FirstChild("Identity").FirstChild().ToText();
\r
51 m_identity=txt->ValueStr();
\r
53 ssk.SetPublicKey(m_identity);
\r
54 if(ssk.ValidPublicKey()==false)
\r