26 #include <xercesc/util/PlatformUtils.hpp> 27 #include <xercesc/sax2/SAX2XMLReader.hpp> 28 #include <xercesc/sax2/Attributes.hpp> 35 namespace XERCES = XERCES_CPP_NAMESPACE;
38 IsisXMLList::IsisXMLList(
char *PencodingName,
39 bool &PexpandNamespaces,
40 XERCES::SAX2XMLReader* &Pparser,
43 encodingName = PencodingName;
44 expandNamespaces = PexpandNamespaces;
48 prevDocHandler = parser->getContentHandler();
49 prevErrorHandler = parser->getErrorHandler();
51 parser->setContentHandler(
this);
52 parser->setErrorHandler(
this);
54 generalHandler = NULL;
55 multipleValuesHandler = NULL;
60 IsisXMLList::~IsisXMLList() {
62 if(generalHandler)
delete generalHandler;
63 if(multipleValuesHandler != NULL)
delete multipleValuesHandler;
64 if(ignoreHandler != NULL)
delete ignoreHandler;
69 void IsisXMLList::characters(
const XMLCh *
const chars,
70 const XMLSize_t length) {
74 void IsisXMLList::endElement(
const XMLCh *
const uri,
75 const XMLCh *
const localname,
76 const XMLCh *
const qname) {
77 parser->setContentHandler(prevDocHandler);
78 parser->setErrorHandler(prevErrorHandler);
81 void IsisXMLList::startElement(
const XMLCh *
const uri,
82 const XMLCh *
const localname,
83 const XMLCh *
const qname,
84 const XERCES::Attributes &attributes) {
86 if((
string)XERCES::XMLString::transcode(localname) == (
string)
"brief") {
87 if(generalHandler != NULL) {
88 delete generalHandler;
89 generalHandler = NULL;
91 generalHandler =
new IsisXMLHandler(encodingName, expandNamespaces, parser,
94 else if((
string)XERCES::XMLString::transcode(localname) == (
string)
"description") {
95 if(generalHandler != NULL) {
96 delete generalHandler;
97 generalHandler = NULL;
99 generalHandler =
new IsisXMLHandler(encodingName, expandNamespaces, parser,
102 else if((
string)XERCES::XMLString::transcode(localname) == (
string)
"exclusions") {
103 if(multipleValuesHandler != NULL) {
104 delete multipleValuesHandler;
105 multipleValuesHandler = NULL;
107 multipleValuesHandler =
109 parser, &list->exclude);
111 else if((
string)XERCES::XMLString::transcode(localname) == (
string)
"inclusions") {
112 if(multipleValuesHandler != NULL) {
113 delete multipleValuesHandler;
114 multipleValuesHandler = NULL;
116 multipleValuesHandler =
118 parser, &list->include);
121 if(ignoreHandler != NULL) {
122 delete ignoreHandler;
123 ignoreHandler = NULL;
127 (
string)XERCES::XMLString::transcode(localname));
Namespace for the standard library.