Inheritance diagram for org::xmlBlaster::util::XmlHandlerBase:
Public Member Functions | |
virtual void | init (const std::string &xmlLiteral)=0 |
virtual std::string | toString ()=0 |
| |
virtual std::string | toXml ()=0 |
| |
virtual void | startDocument ()=0 |
Start document. | |
virtual void | startElement (const std::string &name, Attributes &attrs)=0 |
Start element. | |
virtual void | characters (const std::string &ch)=0 |
Characters. | |
virtual void | ignorableWhitespace (const std::string &ch)=0 |
Ignorable whitespace. | |
void | endElement (const std::string &name)=0 |
End element. | |
virtual void | endDocument ()=0 |
End document. | |
virtual void | warning (const XmlBlasterException &ex)=0 |
Warning. | |
virtual void | error (const XmlBlasterException &ex)=0 |
Error. | |
virtual void | fatalError (const XmlBlasterException &ex)=0 |
Fatal error. | |
void | endCDATA ()=0 |
void | startCDATA ()=0 |
int | getIntValue (const std::string &value) const |
returns a value (usually from an attribute) as an integer | |
long | getLongValue (const std::string &value) const |
returns a value (usually from an attribute) as a long | |
Timestamp | getTimestampValue (const std::string &value) const |
returns a value (usually from an attribute) as a Timestamp | |
bool | getBoolValue (const std::string &value) const |
returns a value (usually from an attribute) as a bool | |
bool | getStringAttr (const Attributes &attrs, const std::string &name, std::string &value, bool doTrim=true) const |
gets the attribute specified by 'name' in the attribute list specified by 'list'. | |
bool | getIntAttr (const Attributes &attrs, const std::string &name, int &value) const |
gets the attribute specified by 'name' in the attribute list specified by 'list'. | |
bool | getLongAttr (const Attributes &attrs, const std::string &name, long &value) const |
gets the attribute specified by 'name' in the attribute list specified by 'list'. | |
bool | getTimestampAttr (const Attributes &attrs, const std::string &name, Timestamp &value) const |
gets the attribute specified by 'name' in the attribute list specified by 'list'. | |
bool | getBoolAttr (const Attributes &attrs, const std::string &name, bool &value) const |
gets the attribute specified by 'name' in the attribute list specified by 'list'. |
You may use this as the interface to extend in your specific XML handling (example SAX2).
Definition at line 26 of file I_XmlHandler.h.
virtual void org::xmlBlaster::util::XmlHandlerBase::init | ( | const std::string & | xmlLiteral | ) | [pure virtual] |
virtual std::string org::xmlBlaster::util::XmlHandlerBase::toString | ( | ) | [pure virtual] |
virtual std::string org::xmlBlaster::util::XmlHandlerBase::toXml | ( | ) | [pure virtual] |
void org::xmlBlaster::util::parser::XmlHandlerBase::startDocument | ( | ) | [pure virtual] |
Start document.
Definition at line 164 of file XmlHandlerBase.cpp.
Referenced by org::xmlBlaster::util::parser::Sax2Parser::startDocument().
virtual void org::xmlBlaster::util::XmlHandlerBase::startElement | ( | const std::string & | name, | |
Attributes & | attrs | |||
) | [pure virtual] |
virtual void org::xmlBlaster::util::XmlHandlerBase::characters | ( | const std::string & | ch | ) | [pure virtual] |
Characters.
The text between two tags, in the following example 'Hello': <key>Hello</key>. This method is different from the java version since the c++ parser always starts at the first character, so you don't specify start.
Referenced by org::xmlBlaster::util::parser::Sax2Parser::characters().
virtual void org::xmlBlaster::util::XmlHandlerBase::ignorableWhitespace | ( | const std::string & | ch | ) | [pure virtual] |
Ignorable whitespace.
void org::xmlBlaster::util::XmlHandlerBase::endElement | ( | const std::string & | name | ) | [pure virtual] |
void org::xmlBlaster::util::parser::XmlHandlerBase::endDocument | ( | ) | [pure virtual] |
End document.
Definition at line 169 of file XmlHandlerBase.cpp.
Referenced by org::xmlBlaster::util::parser::Sax2Parser::endDocument().
virtual void org::xmlBlaster::util::XmlHandlerBase::warning | ( | const XmlBlasterException & | ex | ) | [pure virtual] |
virtual void org::xmlBlaster::util::XmlHandlerBase::error | ( | const XmlBlasterException & | ex | ) | [pure virtual] |
virtual void org::xmlBlaster::util::XmlHandlerBase::fatalError | ( | const XmlBlasterException & | ex | ) | [pure virtual] |
void org::xmlBlaster::util::parser::XmlHandlerBase::endCDATA | ( | ) | [pure virtual] |
Definition at line 144 of file XmlHandlerBase.cpp.
Referenced by org::xmlBlaster::util::parser::Sax2Parser::endCDATA().
void org::xmlBlaster::util::parser::XmlHandlerBase::startCDATA | ( | ) | [pure virtual] |
Definition at line 154 of file XmlHandlerBase.cpp.
Referenced by org::xmlBlaster::util::parser::Sax2Parser::startCDATA().
int org::xmlBlaster::util::XmlHandlerBase::getIntValue | ( | const std::string & | value | ) | const |
returns a value (usually from an attribute) as an integer
long org::xmlBlaster::util::XmlHandlerBase::getLongValue | ( | const std::string & | value | ) | const |
returns a value (usually from an attribute) as a long
Timestamp org::xmlBlaster::util::XmlHandlerBase::getTimestampValue | ( | const std::string & | value | ) | const |
returns a value (usually from an attribute) as a Timestamp
bool org::xmlBlaster::util::XmlHandlerBase::getBoolValue | ( | const std::string & | value | ) | const |
returns a value (usually from an attribute) as a bool
bool org::xmlBlaster::util::XmlHandlerBase::getStringAttr | ( | const Attributes & | attrs, | |
const std::string & | name, | |||
std::string & | value, | |||
bool | doTrim = true | |||
) | const |
gets the attribute specified by 'name' in the attribute list specified by 'list'.
The result is put in the 'value' argument which is passed by reference. It returns 'true' if the attribute was found in the specified attribute list or 'false' if it was not. In the later case, the value is untouched by this method. If the 'doTrim' argument is set to true, the std::string is trimmed before it is given back.
bool org::xmlBlaster::util::XmlHandlerBase::getIntAttr | ( | const Attributes & | attrs, | |
const std::string & | name, | |||
int & | value | |||
) | const |
gets the attribute specified by 'name' in the attribute list specified by 'list'.
The result is put in the 'value' argument which is passed by reference. It returns 'true' if the attribute was found in the specified attribute list or 'false' if it was not. In the later case, the value is untouched by this method.
bool org::xmlBlaster::util::XmlHandlerBase::getLongAttr | ( | const Attributes & | attrs, | |
const std::string & | name, | |||
long & | value | |||
) | const |
gets the attribute specified by 'name' in the attribute list specified by 'list'.
The result is put in the 'value' argument which is passed by reference. It returns 'true' if the attribute was found in the specified attribute list or 'false' if it was not. In the later case, the value is untouched by this method.
bool org::xmlBlaster::util::XmlHandlerBase::getTimestampAttr | ( | const Attributes & | attrs, | |
const std::string & | name, | |||
Timestamp & | value | |||
) | const |
gets the attribute specified by 'name' in the attribute list specified by 'list'.
The result is put in the 'value' argument which is passed by reference. It returns 'true' if the attribute was found in the specified attribute list or 'false' if it was not. In the later case, the value is untouched by this method.
bool org::xmlBlaster::util::XmlHandlerBase::getBoolAttr | ( | const Attributes & | attrs, | |
const std::string & | name, | |||
bool & | value | |||
) | const |
gets the attribute specified by 'name' in the attribute list specified by 'list'.
The result is put in the 'value' argument which is passed by reference. It returns 'true' if the attribute was found in the specified attribute list or 'false' if it was not. In the later case, the value is untouched by this method.