16 std::cout <<
"UNKNOWN";
20 std::cout <<
"START_DOCUMENT";
24 std::cout <<
"END_DOCUMENT";
28 std::cout <<
"START_ELEMENT";
32 std::cout <<
"END_ELEMENT";
44 std::cout <<
"IGNORABLE_WHITESPACE";
48 std::cout <<
"WHITESPACE";
52 std::cout <<
"PROCESSING_INSTRUCTION";
56 std::cout <<
"START_PREFIX_MAPPING";
60 std::cout <<
"END_PREFIX_MAPPING";
64 std::cout <<
"SKIPPED_ENTITY";
67 std::cout << std::endl;
70 void ReadXML(
const std::string& path,
bool validSchema,
bool ignoreWhiteSpaces)
75 reader->setValidationScheme(validSchema);
76 reader->setIgnoreWhiteSpaces(ignoreWhiteSpaces);
80 std::cout <<
":: File information: " << path;
81 std::cout << std::endl;
85 std::cout <<
"Element Name: " << reader->getElementLocalName() <<
" -> ";
90 std::cout <<
" Attributes" << std::endl;
91 for(std::size_t i = 0; i < reader->getNumberOfAttrs(); ++i)
92 std::cout <<
" * [" << reader->getAttrLocalName(i) <<
" = " << reader->getAttr(i) <<
"]" << std::endl;
96 std::cout <<
" * Element value: " << reader->getElementValue() << std::endl;
98 std::cout << std::endl;
100 catch(
const std::exception& e)
102 std::cout << std::endl <<
"An exception has occurred: " << e.what() << std::endl;
107 std::cout << std::endl <<
"An unexpected exception has occurred!" << std::endl;
static te::xml::Reader * make()
It creates a new XML reader using the dafault implementation.
void NodeTypePrinter(te::xml::NodeType type)
NodeType
The type of node read by XML reader.
This file contains include headers for TerraLib XML module.
void ReadXML(const std::string &path, bool validSchema, bool ignoreWhiteSpaces)