summaryrefslogtreecommitdiffstats
path: root/xmlserializer/XmlDocSource.h
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/XmlDocSource.h
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/XmlDocSource.h')
-rw-r--r--xmlserializer/XmlDocSource.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/xmlserializer/XmlDocSource.h b/xmlserializer/XmlDocSource.h
index 9b780e5..fd9a693 100644
--- a/xmlserializer/XmlDocSource.h
+++ b/xmlserializer/XmlDocSource.h
@@ -52,8 +52,9 @@ public:
*
* @param[out] pDoc a pointer to the xml document that will be filled by the class
* @param[in] pRootNode a pointer to the root element of the document.
+ * @param[in] bValidateWithSchema a boolean that toggles schema validation
*/
- CXmlDocSource(_xmlDoc* pDoc, _xmlNode* pRootNode = NULL);
+ CXmlDocSource(_xmlDoc* pDoc, _xmlNode* pRootNode = NULL, bool bValidateWithSchema = false);
/**
* Constructor
@@ -76,8 +77,26 @@ public:
* @param[out] pDoc a pointer to the xml document that will be filled by the class
* @param[in] strXmlSchemaFile a string containing the path to the schema file
* @param[in] strRootElementType a string containing the root element type
+ * @param[in] strRootElementName a string containing the root element name
+ * @param[in] strNameAttributeName a string containing the name of the root name attribute
+ * @param[in] bValidateWithSchema a boolean that toggles schema validation
*/
- CXmlDocSource(_xmlDoc* pDoc, const string& strXmlSchemaFile, const string& strRootElementType);
+ CXmlDocSource(_xmlDoc* pDoc,
+ const string& strXmlSchemaFile,
+ const string& strRootElementType,
+ const string& strRootElementName,
+ const string& strNameAttrituteName,
+ bool bValidateWithSchema);
+
+ /**
+ * Constructor
+ *
+ * @param[out] pDoc a pointer to the xml document that will be filled by the class
+ * @param[in] strXmlSchemaFile a string containing the path to the schema file
+ * @param[in] strRootElementType a string containing the root element type
+ */
+ CXmlDocSource(_xmlDoc* pDoc, const string& strXmlSchemaFile, const string& strRootElementType,
+ bool bValidateWithSchema);
/**
* Destructor
@@ -197,4 +216,9 @@ private:
* Boolean that enables the root element name attribute check
*/
bool _bNameCheck;
+
+ /**
+ * Boolean that enables the validation via xsd files
+ */
+ bool _bValidateWithSchema;
};