26#include <xercesc/sax2/SAX2XMLReader.hpp>
83 static void setValidation(
const std::string& validationScheme,
const std::string& netValidationScheme,
const std::string& routeValidationScheme);
108 const bool isNet =
false,
const bool isRoute =
false);
143 const bool isNet =
false,
const bool isRoute =
false,
144 const bool isExternal =
false,
const bool catchExceptions =
true);
148 static std::string
warnLocalScheme(
const std::string& newScheme,
const bool haveSUMO_HOME);
A handler which converts occurring elements and attributes into enums.
SAX-handler base for SUMO-files.
SAX-reader encapsulation containing binary reader.
Utility methods for initialising, closing and using the XML-subsystem.
static int myNextFreeReader
Information whether the reader is parsing.
static std::vector< SUMOSAXReader * > myReaders
The XML Readers used for repeated parsing.
static void setHandler(GenericSAXHandler &handler)
Sets the given handler for the default reader.
static std::string myValidationScheme
Information whether built reader/parser shall validate XML-documents against schemata.
static void setValidation(const std::string &validationScheme, const std::string &netValidationScheme, const std::string &routeValidationScheme)
Enables or disables validation.
static XERCES_CPP_NAMESPACE::XMLGrammarPool * myGrammarPool
Schema cache to be used for grammars which are not declared.
static SUMOSAXReader * getSAXReader(SUMOSAXHandler &handler, const bool isNet=false, const bool isRoute=false)
Builds a reader and assigns the handler to it.
static void close()
Closes the xml-subsystem.
static void init()
Initialises the xml-subsystem.
static std::string warnLocalScheme(const std::string &newScheme, const bool haveSUMO_HOME)
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false, const bool isRoute=false, const bool isExternal=false, const bool catchExceptions=true)
Runs the given handler on the given file; returns if everything's ok.
static std::string myRouteValidationScheme
Information whether built reader/parser shall validate SUMO routes against schemata.
static bool myNeedsValidationWarning
Whether a warning about missing SUMO_HOME should be emitted.
static std::string myNetValidationScheme
Information whether built reader/parser shall validate SUMO networks against schemata.