50 ,
const XMLCh*
const localname
51 ,
const XMLCh*
const qname
54 DCOUT_V(
'P',
"DDLSAX2FileHandler::startElement started");
56 std::string myElementName(
StrX(qname).localForm());
75 unsigned int numAtts = attrs.getLength();
76 std::vector<std::string> attrNames, attrValues;
78 for (
unsigned int i = 0; i < numAtts; ++
i)
82 attrNames.push_back(std::string(
StrX(attrs.getLocalName(i)).localForm()));
83 attrValues.push_back(std::string(
StrX(attrs.getValue(i)).localForm()));
91 DCOUT_V(
'P',
"DDLSAX2FileHandler::startElement completed");
96 const XMLCh*
const localname,
97 const XMLCh*
const qname )
99 std::string ts(
StrX(qname).localForm());
100 const std::string& myElementName =
self();
101 DCOUT_V(
'P',
"DDLSAX2FileHandler::endElement started");
102 DCOUT_V(
'P',
" " + myElementName);
128 DCOUT_V(
'P',
"DDLSAX2FileHandler::endElement completed");
134 const unsigned int length )
136 DCOUT_V(
'P',
"DDLSAX2FileHandler::characters started");
144 std::string inString =
"";
145 for (
unsigned int i = 0;
i < length; ++
i)
148 inString = inString +
s;
155 DCOUT_V(
'P',
"DDLSAX2FileHandler::characters completed");
160 ,
const unsigned int length)
DDLSAX2FileHandler(DDCompactView &cpv)
virtual const std::string & parent() const
void appendText(const std::string &inText)
append to the current (i.e. most recently added)
virtual const std::string & self() const
void setParent(const std::string &pename)
Set parent element name to central list of names.
virtual void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.
static std::string & ns()
type of data representation of DDCompactView
void loadText(const std::string &inText)
Used to load both text and XML comments into this object.
void setSelf(const std::string &sename)
Set self element name to central list of names.
void dumpElementTypeCounter()
This dumps some statistics on elements encountered in the file.
static value_type & instance()
void loadAttributes(const std::string &elemName, const std::vector< std::string > &names, const std::vector< std::string > &values, const std::string &nmspace, DDCompactView &cpv)
Load the element attributes.
void characters(const XMLCh *const chars, const unsigned int length)
void comment(const XMLCh *const chars, const unsigned int length)
virtual bool gotText(void) const
gotText()? kind of like gotMilk? Yes = text has already been encountered.
#define DCOUT_V(M_v_Y, M_v_S)
std::vector< std::string > namesMap_
void endElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
std::vector< size_t > names_
std::map< std::string, int > elementTypeCounter_
static void createConstantsFromEvaluator()
creates all DDConstants from the variables of the ClhepEvaluator
This is a base class for processing XML elements in the DDD.
XERCES_CPP_NAMESPACE::Attributes Attributes
void createDDConstants() const
creates all DDConstant from the evaluator which has been already 'filled' in the first scan of the do...
void startElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs)