/* * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include #include #include #include #include #include namespace Swift { class SWIFTEN_API XMLElement : public XMLNode { public: typedef std::shared_ptr ref; XMLElement(const std::string& tag, const std::string& xmlns = "", const std::string& text = ""); static std::string escapeAttributeValue(std::string value); void setAttribute(const std::string& attribute, const std::string& value); void addNode(std::shared_ptr node); virtual std::string serialize(); private: std::string tag_; std::map attributes_; std::vector< std::shared_ptr > childNodes_; }; }