diff options
Diffstat (limited to 'xmlserializer/XmlElement.cpp')
-rw-r--r-- | xmlserializer/XmlElement.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmlserializer/XmlElement.cpp b/xmlserializer/XmlElement.cpp index ffd5787..9f3f84a 100644 --- a/xmlserializer/XmlElement.cpp +++ b/xmlserializer/XmlElement.cpp @@ -25,6 +25,7 @@ #include "XmlElement.h" #include <libxml/tree.h> #include <stdlib.h> +#include <sstream> CXmlElement::CXmlElement(_xmlNode* pXmlElement) : _pXmlElement(pXmlElement) { @@ -199,6 +200,13 @@ void CXmlElement::setAttributeString(const string& strAttributeName, const strin xmlNewProp(_pXmlElement, BAD_CAST strAttributeName.c_str(), BAD_CAST strValue.c_str()); } +void CXmlElement::setAttributeInteger(const string& strAttributeName, uint32_t uiValue) +{ + ostringstream strStream; + strStream << uiValue; + setAttributeString(strAttributeName, strStream.str()); +} + void CXmlElement::setNameAttribute(const string& strValue) { setAttributeString("Name", strValue); |