From 326a31df0dd401283de6170ed09bcf605f61ef7d Mon Sep 17 00:00:00 2001 From: Georges-Henri Baron Date: Thu, 28 Jun 2012 12:05:09 +0200 Subject: PFW: Add two commands to print xml settings and structure BZ: 44910 Creates two commands that can be called through the command line of the parameter-framework. First command getDomainXML returns a string containing the xml structure of the domains, configurations and settings. Second command getSystemClassXML returns a string containing the xml structure of all the instantiated parameter with their attributes. Change-Id: I9a35333802049a2177b8fc416754fdb67e6efff0 Signed-off-by: Georges-Henri Baron Reviewed-on: http://android.intel.com:8080/55155 Reviewed-by: Rocard, KevinX Reviewed-by: Centelles, Sylvain Tested-by: Mendi, EduardoX Reviewed-by: buildbot Tested-by: buildbot --- xmlserializer/XmlElement.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xmlserializer/XmlElement.cpp') 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 #include +#include 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); -- cgit v1.1