9#include <xercesc/util/PlatformUtils.hpp>
10#include <xercesc/sax2/SAX2XMLReader.hpp>
11#include <xercesc/sax2/Attributes.hpp>
13#include "IsisXMLList.h"
14#include "IsisXMLChTrans.h"
18namespace XERCES = XERCES_CPP_NAMESPACE;
21IsisXMLList::IsisXMLList(
char *PencodingName,
22 bool &PexpandNamespaces,
23 XERCES::SAX2XMLReader* &Pparser,
26 encodingName = PencodingName;
27 expandNamespaces = PexpandNamespaces;
31 prevDocHandler = parser->getContentHandler();
32 prevErrorHandler = parser->getErrorHandler();
34 parser->setContentHandler(
this);
35 parser->setErrorHandler(
this);
37 generalHandler = NULL;
38 multipleValuesHandler = NULL;
43IsisXMLList::~IsisXMLList() {
45 if(generalHandler)
delete generalHandler;
46 if(multipleValuesHandler != NULL)
delete multipleValuesHandler;
47 if(ignoreHandler != NULL)
delete ignoreHandler;
52void IsisXMLList::characters(
const XMLCh *
const chars,
53 const XMLSize_t length) {
57void IsisXMLList::endElement(
const XMLCh *
const uri,
58 const XMLCh *
const localname,
59 const XMLCh *
const qname) {
60 parser->setContentHandler(prevDocHandler);
61 parser->setErrorHandler(prevErrorHandler);
64void IsisXMLList::startElement(
const XMLCh *
const uri,
65 const XMLCh *
const localname,
66 const XMLCh *
const qname,
67 const XERCES::Attributes &attributes) {
69 if((
string)XERCES::XMLString::transcode(localname) == (
string)
"brief") {
70 if(generalHandler != NULL) {
71 delete generalHandler;
72 generalHandler = NULL;
74 generalHandler =
new IsisXMLHandler(encodingName, expandNamespaces, parser,
77 else if((
string)XERCES::XMLString::transcode(localname) == (
string)
"description") {
78 if(generalHandler != NULL) {
79 delete generalHandler;
80 generalHandler = NULL;
82 generalHandler =
new IsisXMLHandler(encodingName, expandNamespaces, parser,
85 else if((
string)XERCES::XMLString::transcode(localname) == (
string)
"exclusions") {
86 if(multipleValuesHandler != NULL) {
87 delete multipleValuesHandler;
88 multipleValuesHandler = NULL;
90 multipleValuesHandler =
92 parser, &list->exclude);
94 else if((
string)XERCES::XMLString::transcode(localname) == (
string)
"inclusions") {
95 if(multipleValuesHandler != NULL) {
96 delete multipleValuesHandler;
97 multipleValuesHandler = NULL;
99 multipleValuesHandler =
101 parser, &list->include);
104 if(ignoreHandler != NULL) {
105 delete ignoreHandler;
106 ignoreHandler = NULL;
110 (
string)XERCES::XMLString::transcode(localname));
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
Namespace for the standard library.