LibreOffice Module xmlsecurity (master) 1
|
This class represents a SAX handler which simply forwards to the corresponding libxml API and translates parameter if necessary. More...
#include <saxhelper.hxx>
Public Member Functions | |
SAXHelper () | |
Constructor. More... | |
~SAXHelper () | |
Destructor. More... | |
xmlNodePtr | getCurrentNode () |
void | setCurrentNode (const xmlNodePtr pNode) |
xmlDocPtr | getDocument () |
void | startDocument () |
XDocumentHandler – start an xml document. More... | |
void | endDocument () |
XDocumentHandler – end an xml document. More... | |
void | startElement (std::u16string_view aName, const css::uno::Sequence< css::xml::csax::XMLAttribute > &aAttributes) |
XDocumentHandler – start an xml element. More... | |
void | endElement (std::u16string_view aName) |
XDocumentHandler – end an xml element. More... | |
void | characters (std::u16string_view aChars) |
XDocumentHandler – an xml element or cdata characters. More... | |
void | ignorableWhitespace (std::u16string_view aWhitespaces) |
XDocumentHandler – ignorable xml white space. More... | |
void | processingInstruction (std::u16string_view aTarget, std::u16string_view aData) |
XDocumentHandler – preprocessing instruction. More... | |
Private Attributes | |
xmlParserCtxtPtr | m_pParserCtxt |
xmlSAXHandlerPtr | m_pSaxHandler |
This class represents a SAX handler which simply forwards to the corresponding libxml API and translates parameter if necessary.
Definition at line 36 of file saxhelper.hxx.
SAXHelper::SAXHelper | ( | ) |
Constructor.
In this constructor, a libxml sax parser context is initialized. a libxml default sax handler is initialized with the context.
Definition at line 110 of file saxhelper.cxx.
References m_pParserCtxt, and m_pSaxHandler.
SAXHelper::~SAXHelper | ( | ) |
Destructor.
In this destructor, a libxml sax parser context is destructed. The XML tree in the context is not deallocated because the tree is bind with a document model by the setTargetDocument method, which delegate the target document to destruct the xml tree.
Definition at line 173 of file saxhelper.cxx.
References m_pParserCtxt, and m_pSaxHandler.
void SAXHelper::characters | ( | std::u16string_view | aChars | ) |
XDocumentHandler – an xml element or cdata characters.
css::xml::sax::SAXException | |
css::uno::RuntimeException |
Definition at line 305 of file saxhelper.cxx.
References length, m_pParserCtxt, m_pSaxHandler, and ous_to_nxmlstr().
Referenced by XMLDocumentWrapper_XmlSecImpl::characters().
void SAXHelper::endDocument | ( | ) |
XDocumentHandler – end an xml document.
css::xml::sax::SAXException | |
css::uno::RuntimeException |
Definition at line 245 of file saxhelper.cxx.
References m_pParserCtxt, and m_pSaxHandler.
Referenced by XMLDocumentWrapper_XmlSecImpl::~XMLDocumentWrapper_XmlSecImpl().
void SAXHelper::endElement | ( | std::u16string_view | aName | ) |
XDocumentHandler – end an xml element.
css::xml::sax::SAXException | |
css::uno::RuntimeException |
Definition at line 290 of file saxhelper.cxx.
References aName, m_pParserCtxt, m_pSaxHandler, and ous_to_xmlstr().
Referenced by XMLDocumentWrapper_XmlSecImpl::endElement(), and XMLDocumentWrapper_XmlSecImpl::removeCurrentElement().
|
inline |
Definition at line 46 of file saxhelper.hxx.
References m_pParserCtxt.
Referenced by XMLDocumentWrapper_XmlSecImpl::compressedStartElement(), XMLDocumentWrapper_XmlSecImpl::endElement(), XMLDocumentWrapper_XmlSecImpl::removeCurrentElement(), and XMLDocumentWrapper_XmlSecImpl::XMLDocumentWrapper_XmlSecImpl().
|
inline |
Definition at line 48 of file saxhelper.hxx.
References m_pParserCtxt.
Referenced by XMLDocumentWrapper_XmlSecImpl::XMLDocumentWrapper_XmlSecImpl().
void SAXHelper::ignorableWhitespace | ( | std::u16string_view | aWhitespaces | ) |
XDocumentHandler – ignorable xml white space.
css::xml::sax::SAXException | |
css::uno::RuntimeException |
Definition at line 322 of file saxhelper.cxx.
References length, m_pParserCtxt, m_pSaxHandler, and ous_to_nxmlstr().
Referenced by XMLDocumentWrapper_XmlSecImpl::ignorableWhitespace().
void SAXHelper::processingInstruction | ( | std::u16string_view | aTarget, |
std::u16string_view | aData | ||
) |
XDocumentHandler – preprocessing instruction.
css::xml::sax::SAXException | |
css::uno::RuntimeException |
Definition at line 339 of file saxhelper.cxx.
References aData, m_pParserCtxt, m_pSaxHandler, and ous_to_xmlstr().
Referenced by XMLDocumentWrapper_XmlSecImpl::processingInstruction().
void SAXHelper::setCurrentNode | ( | const xmlNodePtr | pNode | ) |
Definition at line 200 of file saxhelper.cxx.
References m_pParserCtxt.
Referenced by XMLDocumentWrapper_XmlSecImpl::setCurrentElement().
void SAXHelper::startDocument | ( | ) |
XDocumentHandler – start an xml document.
css::xml::sax::SAXException | |
css::uno::RuntimeException |
Definition at line 217 of file saxhelper.cxx.
References m_pParserCtxt, and m_pSaxHandler.
Referenced by XMLDocumentWrapper_XmlSecImpl::XMLDocumentWrapper_XmlSecImpl().
void SAXHelper::startElement | ( | std::u16string_view | aName, |
const css::uno::Sequence< css::xml::csax::XMLAttribute > & | aAttributes | ||
) |
XDocumentHandler – start an xml element.
css::xml::sax::SAXException | |
css::uno::RuntimeException |
Definition at line 253 of file saxhelper.cxx.
References aName, attrlist_to_nxmlstr(), i, m_pParserCtxt, m_pSaxHandler, and ous_to_xmlstr().
Referenced by XMLDocumentWrapper_XmlSecImpl::compressedStartElement(), and XMLDocumentWrapper_XmlSecImpl::XMLDocumentWrapper_XmlSecImpl().
|
private |
Definition at line 39 of file saxhelper.hxx.
Referenced by characters(), endDocument(), endElement(), getCurrentNode(), getDocument(), ignorableWhitespace(), processingInstruction(), SAXHelper(), setCurrentNode(), startDocument(), startElement(), and ~SAXHelper().
|
private |
Definition at line 40 of file saxhelper.hxx.
Referenced by characters(), endDocument(), endElement(), ignorableWhitespace(), processingInstruction(), SAXHelper(), startDocument(), startElement(), and ~SAXHelper().