aboutsummaryrefslogtreecommitdiffstats
path: root/xmlserializer/XmlMemoryDocSource.cpp
diff options
context:
space:
mode:
authorMattijs Korpershoek <mattijsx.korpershoek@intel.com>2014-04-08 14:05:21 +0200
committerMattijs Korpershoek <mattijsx.korpershoek@intel.com>2014-06-25 10:52:20 +0200
commit3141891778a0564887d25b8b06b898daf3c1c9b5 (patch)
tree8774f6d48211002dc50ec654520b9d98aacf89a2 /xmlserializer/XmlMemoryDocSource.cpp
parentf394b389ff6202e94d42266ba39144bdcdefe3ba (diff)
downloadexternal_parameter-framework-3141891778a0564887d25b8b06b898daf3c1c9b5.zip
external_parameter-framework-3141891778a0564887d25b8b06b898daf3c1c9b5.tar.gz
external_parameter-framework-3141891778a0564887d25b8b06b898daf3c1c9b5.tar.bz2
Added possibility to toggle xml validation
BZ: 184054 It was not possible to enable/disable xml file validation. The parameter framework only relied on the LIBXML_SCHEMAS flag. This patchs implements a new constructor for XmlFiles which allows enabling/disabling xml/xsd check. Change-Id: I32d220a42bb27f4ce685f07cb194e78e76f44a5d Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
Diffstat (limited to 'xmlserializer/XmlMemoryDocSource.cpp')
-rw-r--r--xmlserializer/XmlMemoryDocSource.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/xmlserializer/XmlMemoryDocSource.cpp b/xmlserializer/XmlMemoryDocSource.cpp
index b60ee41..85abbfc 100644
--- a/xmlserializer/XmlMemoryDocSource.cpp
+++ b/xmlserializer/XmlMemoryDocSource.cpp
@@ -38,8 +38,10 @@ CXmlMemoryDocSource::CXmlMemoryDocSource(const IXmlSource* pXmlSource,
const string& strRootElementType,
const string& strXmlSchemaFile,
const string& strProduct,
- const string& strVersion):
- base(xmlNewDoc(BAD_CAST "1.0"), xmlNewNode(NULL, BAD_CAST strRootElementType.c_str())),
+ const string& strVersion,
+ bool bValidateWithSchema):
+ base(xmlNewDoc(BAD_CAST "1.0"), xmlNewNode(NULL, BAD_CAST strRootElementType.c_str()),
+ bValidateWithSchema),
_pXmlSource(pXmlSource), _strXmlSchemaFile(strXmlSchemaFile), _bWithHeader(true),
_strProduct(strProduct), _strVersion(strVersion)
{
@@ -47,8 +49,10 @@ CXmlMemoryDocSource::CXmlMemoryDocSource(const IXmlSource* pXmlSource,
}
CXmlMemoryDocSource::CXmlMemoryDocSource(const IXmlSource* pXmlSource,
- const string& strRootElementType):
- base(xmlNewDoc(BAD_CAST "1.0"), xmlNewNode(NULL, BAD_CAST strRootElementType.c_str())),
+ const string& strRootElementType,
+ bool bValidateWithSchema):
+ base(xmlNewDoc(BAD_CAST "1.0"), xmlNewNode(NULL, BAD_CAST strRootElementType.c_str()),
+ bValidateWithSchema),
_pXmlSource(pXmlSource), _bWithHeader(false)
{
init();