RobWorkProject  23.9.11-
Static Public Member Functions | List of all members
XercesDocumentReader Class Reference

Utility class for reading in XML to a DOMDocument. More...

#include <XercesUtils.hpp>

Static Public Member Functions

static xercesc::DOMDocument * readDocument (xercesc::XercesDOMParser &parser, const std::string &filename, const std::string &schemaFileName)
 Read in DOMDocument from file. More...
 
static xercesc::DOMDocument * readDocument (xercesc::XercesDOMParser &parser, std::istream &instream, const std::string &schemaFileName)
 Read in DOMDocument from std::istream. More...
 
static xercesc::DOMDocument * readDocument (xercesc::XercesDOMParser &parser, const xercesc::InputSource &source, const std::string &schemaFileName)
 Read in DOMDocument from xercesc::InputSource. More...
 

Detailed Description

Utility class for reading in XML to a DOMDocument.

Member Function Documentation

◆ readDocument() [1/3]

static xercesc::DOMDocument* readDocument ( xercesc::XercesDOMParser &  parser,
const std::string &  filename,
const std::string &  schemaFileName 
)
static

Read in DOMDocument from file.

The parser has ownership of the DOMDocument returned.

Throws a rw::core::Exception if failing to read document

Parameters
parser[in] Parse to use for reading in
filename[in] File to parse
schemaFileName[in] Optional schema which can be used when parsing
Returns
The DOMDocument created

◆ readDocument() [2/3]

static xercesc::DOMDocument* readDocument ( xercesc::XercesDOMParser &  parser,
const xercesc::InputSource &  source,
const std::string &  schemaFileName 
)
static

Read in DOMDocument from xercesc::InputSource.

The parser has ownership of the DOMDocument returned.

Throws a rw::core::Exception if failing to read document

This method can be used to write to a custom output. See Xerces documentation for information about how to create a XMLFormatTarget

Parameters
parser[in] Parse to use for reading in
source[in] The input source
schemaFileName[in] Optional schema which can be used when parsing
Returns
The DOMDocument created

◆ readDocument() [3/3]

static xercesc::DOMDocument* readDocument ( xercesc::XercesDOMParser &  parser,
std::istream &  instream,
const std::string &  schemaFileName 
)
static

Read in DOMDocument from std::istream.

The parser has ownership of the DOMDocument returned.

Throws a rw::core::Exception if failing to read document

Parameters
parser[in] Parse to use for reading in
instream[in] Input stream to read from
schemaFileName[in] Optional schema which can be used when parsing
Returns
The DOMDocument created

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