49 ,
const XMLCh*
const localname
50 ,
const XMLCh*
const qname
53 DCOUT_V(
'P',
"DDLSAX2FileHandler::startElement started");
55 std::string myElementName(
StrX(qname).localForm());
74 unsigned int numAtts = attrs.getLength();
75 std::vector<std::string> attrNames, attrValues;
77 for (
unsigned int i = 0; i < numAtts; ++
i)
81 attrNames.push_back(std::string(
StrX(attrs.getLocalName(i)).localForm()));
82 attrValues.push_back(std::string(
StrX(attrs.getValue(i)).localForm()));
90 DCOUT_V(
'P',
"DDLSAX2FileHandler::startElement completed");
95 const XMLCh*
const localname,
96 const XMLCh*
const qname )
98 std::string ts(
StrX(qname).localForm());
99 const std::string& myElementName =
self();
100 DCOUT_V(
'P',
"DDLSAX2FileHandler::endElement started");
101 DCOUT_V(
'P',
" " + myElementName);
127 DCOUT_V(
'P',
"DDLSAX2FileHandler::endElement completed");
133 const unsigned int length )
135 DCOUT_V(
'P',
"DDLSAX2FileHandler::characters started");
143 std::string inString =
"";
144 for (
unsigned int i = 0;
i < length; ++
i)
147 inString = inString +
s;
154 DCOUT_V(
'P',
"DDLSAX2FileHandler::characters completed");
159 ,
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)