void IXMLHandler::impl::startElement(const XMLCh * const uri, const XMLCh * const localname, const XMLCh* const qname, const xerces::Attributes &attrs) { HandlerBase::startElement(uri, localname, qname, attrs); StringCollection<String> attributes; XMLSize_t count = attrs.getLength(); for(XMLSize_t i = 0; i < count; i++) { attributes.set(attrs.getLocalName(i), attrs.getValue(i)); } m_handler->onStartElement(localname, attributes); }
void IsisXMLParameter::startElement(const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname, const XERCES::Attributes& attributes) { if ((string)XERCES::XMLString::transcode(localname) == (string)"type") { if (generalHandler != NULL) { delete generalHandler; generalHandler = NULL; } generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, ¶meter->type); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"brief") { if (generalHandler != NULL) { delete generalHandler; generalHandler = NULL; } generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, ¶meter->brief); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"description") { if (generalHandler != NULL) { delete generalHandler; generalHandler = NULL; } generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, ¶meter->description); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"default") { if (multipleValuesHandler != NULL) { delete multipleValuesHandler; multipleValuesHandler = NULL; } multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces, parser, ¶meter->defaultValues); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"internalDefault") { if (generalHandler != NULL) { delete generalHandler; generalHandler = NULL; } generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, ¶meter->internalDefault); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"count") { if (generalHandler != NULL) { delete generalHandler; generalHandler = NULL; } generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, ¶meter->count); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"list") { } else if ((string)XERCES::XMLString::transcode(localname) == (string)"option") { if (listHandler != NULL) { delete listHandler; listHandler = NULL; } unsigned int index = parameter->listOptions.size(); parameter->listOptions.resize (index + 1); Isis::iString lo = XERCES::XMLString::transcode (attributes.getValue((unsigned int)0)); lo.UpCase(); parameter->listOptions[index].value = lo; listHandler = new IsisXMLList (encodingName, expandNamespaces, parser, ¶meter->listOptions[index]); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"minimum") { if (generalHandler != NULL) { delete generalHandler; generalHandler = NULL; } Isis::iString mi = XERCES::XMLString::transcode (attributes.getValue((unsigned int)0)); mi.DownCase(); parameter->minimum_inclusive = mi; generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, ¶meter->minimum); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"maximum") { if (generalHandler != NULL) { delete generalHandler; generalHandler = NULL; } Isis::iString mi = XERCES::XMLString::transcode (attributes.getValue((unsigned int)0)); mi.DownCase(); parameter->maximum_inclusive = mi; generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, ¶meter->maximum); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"greaterThan") { if (multipleValuesHandler != NULL) { delete multipleValuesHandler; multipleValuesHandler = NULL; } multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces, parser, ¶meter->greaterThan); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"greaterThanOrEqual") { if (multipleValuesHandler != NULL) { delete multipleValuesHandler; multipleValuesHandler = NULL; } multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces, parser, ¶meter->greaterThanOrEqual); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"lessThan") { if (multipleValuesHandler != NULL) { delete multipleValuesHandler; multipleValuesHandler = NULL; } multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces, parser, ¶meter->lessThan); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"lessThanOrEqual") { if (multipleValuesHandler != NULL) { delete multipleValuesHandler; multipleValuesHandler = NULL; } multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces, parser, ¶meter->lessThanOrEqual); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"notEqual") { if (multipleValuesHandler != NULL) { delete multipleValuesHandler; multipleValuesHandler = NULL; } multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces, parser, ¶meter->notEqual); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"odd") { if (generalHandler != NULL) { delete generalHandler; generalHandler = NULL; } parameter->odd = "TRUE"; generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"exclusions") { if (multipleValuesHandler != NULL) { delete multipleValuesHandler; multipleValuesHandler = NULL; } multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces, parser, ¶meter->exclude); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"inclusions") { if (multipleValuesHandler != NULL) { delete multipleValuesHandler; multipleValuesHandler = NULL; } multipleValuesHandler = new IsisXMLMultipleValues (encodingName, expandNamespaces, parser, ¶meter->include); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"filter") { if (generalHandler != NULL) { delete generalHandler; generalHandler = NULL; } generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, ¶meter->filter); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"defaultPath") { if (generalHandler != NULL) { delete generalHandler; generalHandler = NULL; } generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, ¶meter->path); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"fileMode") { if (generalHandler != NULL) { delete generalHandler; generalHandler = NULL; } generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, ¶meter->fileMode); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"pixelType") { if (generalHandler != NULL) { delete generalHandler; generalHandler = NULL; } generalHandler = new IsisXMLHandler (encodingName, expandNamespaces, parser, ¶meter->pixelType); } else if ((string)XERCES::XMLString::transcode(localname) == (string)"helpers") { if (helpersHandler != NULL) { delete helpersHandler; helpersHandler = NULL; } helpersHandler = new IsisXMLHelpers (encodingName, expandNamespaces, parser, ¶meter->helpers); } else { if (ignoreHandler != NULL) { delete ignoreHandler; ignoreHandler = NULL; } ignoreHandler = new IsisXMLIgnore (encodingName, expandNamespaces, parser, (string)XERCES::XMLString::transcode(localname)); } }