diff options
Diffstat (limited to 'Swiften/Serializer/XML/XMLTextNode.h')
-rw-r--r-- | Swiften/Serializer/XML/XMLTextNode.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Swiften/Serializer/XML/XMLTextNode.h b/Swiften/Serializer/XML/XMLTextNode.h index dae4d58..4d55f76 100644 --- a/Swiften/Serializer/XML/XMLTextNode.h +++ b/Swiften/Serializer/XML/XMLTextNode.h @@ -7,28 +7,28 @@ #pragma once #include "Swiften/Serializer/XML/XMLNode.h" - +#include <Swiften/Base/String.h> 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('<', "<"); - text_.replaceAll('>', ">"); + XMLTextNode(const std::string& text) : text_(text) { + String::replaceAll(text_, '&', "&"); // Should come first + String::replaceAll(text_, '<', "<"); + String::replaceAll(text_, '>', ">"); } - String serialize() { + std::string serialize() { return text_; } - static ref create(const String& text) { + static ref create(const std::string& text) { return ref(new XMLTextNode(text)); } private: - String text_; + std::string text_; }; } |