diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-08-08 18:41:53 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-08-08 18:41:53 (GMT) |
commit | 19df82042f44c201e5a2821b4fa35465e33a1c90 (patch) | |
tree | 1746bddfa31ce2a6488ef5186036a049a255c9da /Swiften/Serializer/XML | |
parent | 4a5a0977f661bf5c7c34ee7aa48b35073a682203 (diff) | |
download | swift-19df82042f44c201e5a2821b4fa35465e33a1c90.zip swift-19df82042f44c201e5a2821b4fa35465e33a1c90.tar.bz2 |
Added XEP-0004 data forms parsing & serializing.
Diffstat (limited to 'Swiften/Serializer/XML')
-rw-r--r-- | Swiften/Serializer/XML/XMLTextNode.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Swiften/Serializer/XML/XMLTextNode.h b/Swiften/Serializer/XML/XMLTextNode.h index 5f870ba..c1d13ef 100644 --- a/Swiften/Serializer/XML/XMLTextNode.h +++ b/Swiften/Serializer/XML/XMLTextNode.h @@ -11,6 +11,8 @@ namespace Swift { class XMLTextNode : public XMLNode { public: + typedef boost::shared_ptr<XMLTextNode> ref; + XMLTextNode(const String& text) : text_(text) { text_.replaceAll('&', "&"); // Should come first text_.replaceAll('<', "<"); @@ -21,6 +23,10 @@ namespace Swift { return text_; } + static ref create(const String& text) { + return ref(new XMLTextNode(text)); + } + private: String text_; }; |