LibreOffice Module xmloff (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DomBuilderContext Class Referencefinal

DomBuilderContext creates a DOM tree suitable for in-memory processing of XML data from a sequence of SAX events. More...

#include <DomBuilderContext.hxx>

Inheritance diagram for DomBuilderContext:
[legend]
Collaboration diagram for DomBuilderContext:
[legend]

Public Member Functions

 DomBuilderContext (SvXMLImport &rImport, sal_Int32 nElement)
 default constructor: create new DOM tree More...
 
 DomBuilderContext (SvXMLImport &rImport, const OUString &Namespace, const OUString &Name)
 
 DomBuilderContext (SvXMLImport &rImport, sal_Int32 nElement, css::uno::Reference< css::xml::dom::XNode > const &)
 constructor: create DOM subtree under the given node More...
 
 DomBuilderContext (SvXMLImport &rImport, const OUString &Namespace, const OUString &Name, css::uno::Reference< css::xml::dom::XNode > const &)
 constructor: create DOM subtree under the given node More...
 
virtual ~DomBuilderContext () override
 
css::uno::Reference< css::xml::dom::XDocument > getTree ()
 access the DOM tree More...
 
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
 
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext (const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void SAL_CALL startFastElement (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
 
virtual void SAL_CALL startUnknownElement (const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void SAL_CALL characters (const OUString &rChars) override
 This method is called for all characters that are contained in the current element. More...
 
- Public Member Functions inherited from SvXMLImportContext
 SvXMLImportContext (SvXMLImport &rImport)
 A contexts constructor does anything that is required if an element starts. More...
 
virtual ~SvXMLImportContext ()
 A contexts destructor does anything that is required if an element ends. More...
 
virtual void SAL_CALL endFastElement (sal_Int32 Element) override
 endFastElement is called before a context will be destructed, but after an elements context has been parsed. More...
 
virtual void SAL_CALL endUnknownElement (const OUString &Namespace, const OUString &Name) override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &aType) final override
 
virtual void SAL_CALL acquire () noexcept final override
 
virtual void SAL_CALL release () noexcept final override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () final override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () final override
 

Private Member Functions

void HandleAttributes (const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs)
 

Private Attributes

css::uno::Reference< css::xml::dom::XNode > mxNode
 

Additional Inherited Members

- Protected Member Functions inherited from SvXMLImportContext
SvXMLImportGetImport ()
 
const SvXMLImportGetImport () const
 

Detailed Description

DomBuilderContext creates a DOM tree suitable for in-memory processing of XML data from a sequence of SAX events.

Definition at line 43 of file DomBuilderContext.hxx.

Constructor & Destructor Documentation

DomBuilderContext::DomBuilderContext ( SvXMLImport rImport,
sal_Int32  nElement 
)

default constructor: create new DOM tree

Definition at line 64 of file DomBuilderContext.cxx.

References mxNode, and SAL_WARN_IF.

Referenced by createFastChildContext(), and createUnknownChildContext().

DomBuilderContext::DomBuilderContext ( SvXMLImport rImport,
const OUString &  Namespace,
const OUString &  Name 
)

Definition at line 75 of file DomBuilderContext.cxx.

References mxNode, and SAL_WARN_IF.

DomBuilderContext::DomBuilderContext ( SvXMLImport rImport,
sal_Int32  nElement,
css::uno::Reference< css::xml::dom::XNode > const &   
)

constructor: create DOM subtree under the given node

DomBuilderContext::DomBuilderContext ( SvXMLImport rImport,
const OUString &  Namespace,
const OUString &  Name,
css::uno::Reference< css::xml::dom::XNode > const &   
)

constructor: create DOM subtree under the given node

DomBuilderContext::~DomBuilderContext ( )
overridevirtual

Definition at line 108 of file DomBuilderContext.cxx.

Member Function Documentation

void DomBuilderContext::characters ( const OUString &  aChars)
overridevirtual

This method is called for all characters that are contained in the current element.

The default is to ignore them.

Reimplemented from SvXMLImportContext.

Definition at line 213 of file DomBuilderContext.cxx.

References mxNode, and SAL_WARN_IF.

css::uno::Reference< css::xml::sax::XFastContextHandler > DomBuilderContext::createFastChildContext ( sal_Int32  nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  AttrList 
)
overridevirtual

Reimplemented from SvXMLImportContext.

Definition at line 118 of file DomBuilderContext.cxx.

References DomBuilderContext(), SvXMLImportContext::GetImport(), and mxNode.

css::uno::Reference< css::xml::sax::XFastContextHandler > DomBuilderContext::createUnknownChildContext ( const OUString &  Namespace,
const OUString &  Name,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  Attribs 
)
overridevirtual

Reimplemented from SvXMLImportContext.

Definition at line 125 of file DomBuilderContext.cxx.

References DomBuilderContext(), SvXMLImportContext::GetImport(), and mxNode.

Reference< XDocument > DomBuilderContext::getTree ( )
void DomBuilderContext::HandleAttributes ( const css::uno::Reference< css::xml::sax::XFastAttributeList > &  Attribs)
private
void SAL_CALL DomBuilderContext::startFastElement ( sal_Int32  nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList 
)
overridevirtual

Reimplemented from SvXMLImportContext.

Definition at line 132 of file DomBuilderContext.cxx.

References HandleAttributes(), mxNode, and SAL_WARN_IF.

void SAL_CALL DomBuilderContext::startUnknownElement ( const OUString &  Namespace,
const OUString &  Name,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  Attribs 
)
overridevirtual

Reimplemented from SvXMLImportContext.

Definition at line 142 of file DomBuilderContext.cxx.

References HandleAttributes(), mxNode, and SAL_WARN_IF.

Member Data Documentation

css::uno::Reference<css::xml::dom::XNode> DomBuilderContext::mxNode
private

The documentation for this class was generated from the following files: