Convenience class to load and validate a Data Definition xml string. More...
#include <ddstring.h>
Static Public Member Functions | |
static dd::DataDefinition | fromXMLString (const std::string &xml_string, const dd::Version &ddl_language_version=dd::Version(0, 0), bool strict=false) |
Read a string containing a data definiton in XML. | |
static dd::DataDefinition | fromXMLString (const std::string &struct_name, const std::string &xml_string, const dd::Version &ddl_language_version=dd::Version(0, 0), bool strict=false) |
Read a string containing a data definiton in XML. | |
static dd::DataDefinition | fromXMLString (const std::string &xml_string, dd::DataDefinition base_dd, const dd::Version &ddl_language_version=dd::Version(0, 0), bool strict=false) |
Read a string containing a data definiton in XML and immediatelly merge it with base_dd before validating. | |
static std::string | toXMLString (const dd::DataDefinition &dd_to_write) |
This will write the given valid Data Definiton into a string as xml. | |
static std::string | toXMLString (const dd::DataDefinition &dd_to_write, const a_util::SortingOrder order) |
This will write the given valid Data Definiton into a string as xml. | |
static std::string | toXMLString (const std::string &struct_name, const dd::DataDefinition &dd_to_write) |
This will write the given valid Data Definiton into a string as xml, but only vith all depending Definition of the StructType with the name struct_name . | |
static std::string | toXMLString (const std::string &struct_name, const dd::DataDefinition &dd_to_write, const a_util::SortingOrder order) |
This will write the given valid Data Definiton into a string as xml, but only vith all depending Definition of the StructType with the name struct_name . | |
Convenience class to load and validate a Data Definition xml string.
This implementation can be used as follows:
Definition at line 45 of file ddstring.h.
|
static |
Read a string containing a data definiton in XML.
struct_name | The data definition will determine if the struct_name extists or not. |
xml_string | The data definition may contain a fully XML defined or parts of it. (struct tag only, structs tag only, datatype only ... etc. but valid!) |
ddl_language_version | if not set the parser will have a look, if the xml_string contains a header or it guesses. |
strict | set to true to load the datamodel exactly like defined (no mixture of DDL tag definitions allowed). |
ddl_language_version
, which is taken into account if no header and so no ddl version is set within the string.ddl::dd::Error | if the xml string 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 struct_name is not part of this description. |
|
static |
Read a string containing a data definiton in XML.
xml_string | The data definition may contain a fully XML defined or parts of it. (struct tag only, structs tag only, datatype only ... etc. but valid!) |
ddl_language_version | if not set the parser will have a look, if the xml_string contains a header or it guesses. |
strict | set to true to load the datamodel exactly like defined (no mixture of DDL tag definitions allowed). |
ddl_language_version
, which is taken into account if no header and so no ddl version is set within the string.ddl::dd::Error | if the xml string 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 string containing a data definiton in XML and immediatelly merge it with base_dd before validating.
xml_string | The data definition may contain a fully XML defined or parts of it. (struct tag only, structs tag only, datatype only ... etc. but valid!) |
base_dd | valid base ddl to merge the new parsed xml_string with. |
ddl_language_version | if not set the parser will have a look, if the xml_string contains a header or it guesses. |
strict | set to true to load the datamodel exactly like defined (no mixture of DDL tag definitions allowed). |
ddl_language_version
, which is taken into account if no header and so no ddl version is set within the string.ddl::dd::Error | if the xml string 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 |
This will write the given valid Data Definiton into a string as xml.
dd_to_write | the DataDefinition to write into a string. |
|
static |
This will write the given valid Data Definiton into a string as xml.
dd_to_write | the DataDefinition to write into a string. |
order | Sort elements in resulting string in either ascending or descending order. |
|
static |
This will write the given valid Data Definiton into a string as xml, but only vith all depending Definition of the StructType with the name struct_name
.
struct_name | name of the struct that is written into the string. |
dd_to_write | the DataDefinition where a StructType with the name struct_name is defined. |
|
static |
This will write the given valid Data Definiton into a string as xml, but only vith all depending Definition of the StructType with the name struct_name
.
struct_name | name of the struct that is written into the string. |
dd_to_write | the DataDefinition where a StructType with the name struct_name is defined. |
order | Sort elements in resulting string in either ascending or descending order. |