26 #include <xercesc/sax2/SAX2XMLReader.hpp> 27 #include <xercesc/sax2/Attributes.hpp> 28 #include <xercesc/util/PlatformUtils.hpp> 38 IsisXMLApplication::IsisXMLApplication(
char *PencodingName,
39 bool &PexpandNamespaces,
40 XERCES::SAX2XMLReader* &Pparser,
43 encodingName = PencodingName;
44 expandNamespaces = PexpandNamespaces;
48 parser->setContentHandler(
this);
49 parser->setErrorHandler(
this);
52 descriptionHandler = NULL;
54 multipleValuesHandler = NULL;
56 historyHandler = NULL;
60 IsisXMLApplication::~IsisXMLApplication() {
62 if(briefHandler != NULL)
delete briefHandler;
63 if(descriptionHandler != NULL)
delete descriptionHandler;
64 if(groupsHandler != NULL)
delete groupsHandler;
65 if(multipleValuesHandler != NULL)
delete multipleValuesHandler;
66 if(ignoreHandler != NULL)
delete ignoreHandler;
67 if(historyHandler != NULL)
delete historyHandler;
74 void IsisXMLApplication::characters(
const XMLCh *
const chars,
75 const XMLSize_t length) {}
79 void IsisXMLApplication::endDocument() {}
82 void IsisXMLApplication::endElement(
const XMLCh *
const uri,
83 const XMLCh *
const localname,
84 const XMLCh *
const qname) {
88 void IsisXMLApplication::processingInstruction(
const XMLCh *
const target,
89 const XMLCh *
const data) {}
92 void IsisXMLApplication::startDocument() {}
95 void IsisXMLApplication::startElement(
const XMLCh *
const uri,
96 const XMLCh *
const localname,
97 const XMLCh *
const qname,
98 const XERCES::Attributes &attributes) {
100 if((
string)XERCES::XMLString::transcode(localname) == (
string)
"application") {
101 QString name = XERCES::XMLString::transcode(attributes.getValue((XMLSize_t)0));
102 appData->name = name.toLower();
104 else if((
string)XERCES::XMLString::transcode(localname) == (
string)
"brief") {
105 if(briefHandler != NULL) {
110 parser, &appData->brief);
112 else if((
string)XERCES::XMLString::transcode(localname) == (
string)
"description") {
113 if(descriptionHandler != NULL) {
114 delete descriptionHandler;
115 descriptionHandler = NULL;
117 descriptionHandler =
new IsisXMLHandler(encodingName, expandNamespaces,
118 parser, &appData->description);
120 else if((
string)XERCES::XMLString::transcode(localname) == (
string)
"groups") {
121 if(groupsHandler != NULL) {
122 delete groupsHandler;
123 groupsHandler = NULL;
125 groupsHandler =
new IsisXMLGroups(encodingName, expandNamespaces, parser,
128 else if((
string)XERCES::XMLString::transcode(localname) == (
string)
"category") {
129 if(multipleValuesHandler != NULL) {
130 delete multipleValuesHandler;
131 multipleValuesHandler = NULL;
134 parser, &appData->categorys);
136 else if((
string)XERCES::XMLString::transcode(localname) == (
string)
"history") {
137 if(historyHandler != NULL) {
138 delete historyHandler;
139 historyHandler = NULL;
141 historyHandler =
new IsisXMLHistory(encodingName, expandNamespaces,
142 parser, &appData->changes);
145 if(ignoreHandler != NULL) {
146 delete ignoreHandler;
147 ignoreHandler = NULL;
149 ignoreHandler =
new IsisXMLIgnore(encodingName, expandNamespaces, parser,
150 (
string)XERCES::XMLString::transcode(localname));
Namespace for the standard library.