diff options
author | Patrick Benavoli <patrick.benavoli@intel.com> | 2014-07-24 18:46:25 +0200 |
---|---|---|
committer | Philippe Afonso <philippex.afonso@intel.com> | 2015-02-18 11:13:27 +0100 |
commit | 8ff3e0fed53fb64b27b01ab69acee60fbf4e4013 (patch) | |
tree | 33f5ffb7c1795e4705faea32ff9666c6b4fde511 /parameter/ParameterMgr.cpp | |
parent | 7f9e3fe4eb15c9ba2ee4205c182ba68c8cc7be0f (diff) | |
download | external_parameter-framework-8ff3e0fed53fb64b27b01ab69acee60fbf4e4013.zip external_parameter-framework-8ff3e0fed53fb64b27b01ab69acee60fbf4e4013.tar.gz external_parameter-framework-8ff3e0fed53fb64b27b01ab69acee60fbf4e4013.tar.bz2 |
Cleaned up XML export feature
BZ: 209937
This patch solves 1 issue regarding XML export feature:
- ParameterMgr.cpp::exportElementToXMLString(): This method was receiving a
useless bValidateWithSchema argument. Indeed, elements in memory are
necessarily valid (unlike documents coming from external sources).
Change-Id: I55bf84c8ff53c37c9fc55e60f7f64e8776a43dc7
Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
Diffstat (limited to 'parameter/ParameterMgr.cpp')
-rw-r--r-- | parameter/ParameterMgr.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp index a1f2087..e11b1ad 100644 --- a/parameter/ParameterMgr.cpp +++ b/parameter/ParameterMgr.cpp @@ -1112,7 +1112,8 @@ CParameterMgr::CCommandHandler::CommandStatus CParameterMgr::listCriteriaCommman // Get Root element where to export from const CSelectionCriteriaDefinition* pSelectionCriteriaDefinition = getConstSelectionCriteria()->getSelectionCriteriaDefinition(); - if (!exportElementToXMLString(pSelectionCriteriaDefinition, "SelectionCriteria", false, strResult)) { + if (!exportElementToXMLString(pSelectionCriteriaDefinition, "SelectionCriteria", + strResult)) { return CCommandHandler::EFailed; } @@ -1676,7 +1677,7 @@ CParameterMgr::CCommandHandler::CommandStatus // Get Root element where to export from const CSystemClass* pSystemClass = getSystemClass(); - if (!exportElementToXMLString(pSystemClass, pSystemClass->getKind(), false, strResult)) { + if (!exportElementToXMLString(pSystemClass, pSystemClass->getKind(), strResult)) { return CCommandHandler::EFailed; } @@ -2612,15 +2613,16 @@ void CParameterMgr::doApplyConfigurations(bool bForce) } // Export to XML string -bool CParameterMgr::exportElementToXMLString(const IXmlSource *pXmlSource, const string& strRootElementType, bool bValidateWithSchema, string& strResult) const +bool CParameterMgr::exportElementToXMLString(const IXmlSource* pXmlSource, + const string& strRootElementType, + string& strResult) const { string strError; CXmlSerializingContext xmlSerializingContext(strError); // Use a doc source by loading data from instantiated Configurable Domains - CXmlMemoryDocSource memorySource(pXmlSource, strRootElementType, - bValidateWithSchema); + CXmlMemoryDocSource memorySource(pXmlSource, strRootElementType, false); // Use a doc sink that write the doc data in a string CXmlStringDocSink stringSink(strResult); |