DDS  ver. 3.6
Static Public Member Functions | List of all members
dds::topology_api::CTopoParserXML Class Reference

#include <TopoParserXML.h>

Static Public Member Functions

static void parse (boost::property_tree::ptree &_pt, const std::string &_filepath, const std::string &_schemaFilepath, std::string *_topologyName=nullptr)
 Parse topology from specified XML file. More...
 
static void parse (boost::property_tree::ptree &_pt, std::istream &_stream, const std::string &_schemaFilepath, std::string *_topologyName=nullptr)
 Parse topology from specified XML input stream. More...
 
static bool isValid (const std::string &_filepath, const std::string &_schemaFilepath, std::string *_output=nullptr)
 Validate provided XML file against XSD using xmllint. More...
 
static bool isValid (std::istream &_stream, const std::string &_schemaFilepath, std::string *_output=nullptr)
 Validate provided XML input stream against XSD using xmllint. More...
 

Member Function Documentation

◆ isValid() [1/2]

static bool dds::topology_api::CTopoParserXML::isValid ( const std::string &  _filepath,
const std::string &  _schemaFilepath,
std::string *  _output = nullptr 
)
static

Validate provided XML file against XSD using xmllint.

Parameters
[in]_filepathPath to the topology file.
[in]_schemaFilepathPath to the XSD schema file.
Returns
true if file is valid or schema filepath is empty, otherwise return false.
Exceptions
std::runtime_error

◆ isValid() [2/2]

static bool dds::topology_api::CTopoParserXML::isValid ( std::istream &  _stream,
const std::string &  _schemaFilepath,
std::string *  _output = nullptr 
)
static

Validate provided XML input stream against XSD using xmllint.

Parameters
[in]_streamInput stream.
[in]_schemaFilepathPath to the XSD schema file.
Returns
true if file is valid or schema filepath is empty, otherwise return false.
Exceptions
std::runtime_error

◆ parse() [1/2]

static void dds::topology_api::CTopoParserXML::parse ( boost::property_tree::ptree &  _pt,
const std::string &  _filepath,
const std::string &  _schemaFilepath,
std::string *  _topologyName = nullptr 
)
static

Parse topology from specified XML file.

Parameters
[out]_ptOutput ptoperty tree.
[in]_filepathPath to the topology file.
[in]_schemaFilepathPath to the XSD schema file.
Exceptions
std::runtime_error.

◆ parse() [2/2]

static void dds::topology_api::CTopoParserXML::parse ( boost::property_tree::ptree &  _pt,
std::istream &  _stream,
const std::string &  _schemaFilepath,
std::string *  _topologyName = nullptr 
)
static

Parse topology from specified XML input stream.

Parameters
[out]_ptOutput ptoperty tree.
[in]_streamInput stream.
[in]_schemaFilepathPath to the XSD schema file.
Exceptions
std::runtime_error.

The documentation for this class was generated from the following files: