Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Data/DataSet.cpp (1 of 18 files). Show all
Unified · Split
| @@ -444,4 +444,23 @@ DataSetPtr DataSet::ParseXmlDataSet(const vector<uint8_t>& xmlDataSet) · 443 unmodified lines | |||
| 444 | } | 444 | } |
| 445 | 445 | ||
| 446 | return dataSet; | 446 | return dataSet; |
| 447 | } | 447 | } |
| 448 | |||
| 449 | vector<uint8_t> DataSet::GenerateXmlDataSet(const DataSetPtr& dataSet, const string& dataSetName) | ||
| 450 | { | ||
| 451 | xml_document document; | ||
| 452 | const char* rootNodeName = dataSetName.c_str(); | ||
| 453 | |||
| 454 | xml_node rootNode = document.append_child(rootNodeName); | ||
| 455 | |||
| 456 | // <xs:schema id="DataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ext="urn:schemas-microsoft-com:xml-msdata"> | ||
| 457 | xml_node schemaNode = rootNode.append_child("xs:schema"); | ||
| 458 | |||
| 459 | schemaNode.append_attribute("id") = rootNodeName; | ||
| 460 | schemaNode.append_attribute("xmlns:xs") = XmlSchemaNamespace.c_str(); | ||
| 461 | schemaNode.append_attribute("xmlns:ext") = ExtXmlSchemaDataNamespace.c_str(); | ||
| 462 | |||
| 463 | vector<uint8_t> xmlDataSet; | ||
| 464 | |||
| 465 | return xmlDataSet; | ||
| 466 | } | ||