Convenience class to load and validate a Data Definition form a xml file string. More...
#include <ddfile.h>
Static Public Member Functions | |
static dd::DataDefinition | fromXMLFile (const std::string &xml_filepath, bool strict=false) |
Read a file containing a data definiton in XML. | |
static dd::DataDefinition | fromXMLFile (const std::string &xml_filepath, dd::DataDefinition base_dd, bool strict=false) |
Read a file containing a data definiton in XML and merge it with an existing definition. | |
static void | toXMLFile (const dd::DataDefinition &ddl_to_write, const std::string &xml_filepath) |
Writes DataDefinition to a file containing a data definiton in XML. | |
static void | toXMLFile (const dd::DataDefinition &ddl_to_write, const std::string &xml_filepath, a_util::SortingOrder order) |
Writes sorted DataDefinition to a file containing a data definiton in XML. | |
Convenience class to load and validate a Data Definition form a xml file string.
This implementation can be used as follows:
|
static |
Read a file containing a data definiton in XML.
xml_filepath | a valid filesystem path for loading a DataDefinition xmlfile. |
strict | set to true to load the datamodel exactly like defined (no mixture of DDL tag definitions allowed). |
ddl::dd::Error | if the xml file is not valid against the xsd definition (depending on the DDL Version). |
ddl::dd::Error | if the validation level of the created DataDefinition is not at least good_enough! |
|
static |
Read a file containing a data definiton in XML and merge it with an existing definition.
xml_filepath | a valid filesystem path for loading a DataDefinition xmlfile. |
base_dd | valid base ddl to merge the new parsed file with. |
strict | set to true to load the datamodel exactly like defined (no mixture of DDL tag definitions allowed). |
ddl::dd::Error | if the xml file is not valid against the xsd definition (depending on the DDL Version). |
ddl::dd::Error | if the validation level of the created DataDefinition is not at least good_enough! |
ddl::dd::Error | if the given base_dd is not valid with at least validation level good_enough! |
|
static |
Writes DataDefinition to a file containing a data definiton in XML.
xml_filepath | a valid filesystem path for loading a DataDefinition xmlfile. |
ddl_to_write | a valid DataDefinition for writing a xmlfile. |
ddl::dd::Error | File could not be written. |
|
static |
Writes sorted DataDefinition to a file containing a data definiton in XML.
xml_filepath | a valid filesystem path for loading a DataDefinition xmlfile. |
ddl_to_write | a valid DataDefinition for writing a xmlfile. |
ddl::dd::Error | File could not be written. |
[in] | order | Sort elements in description file in either ascending or descending order. |