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 startFastElement (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) 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 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::Reference< XFastContextHandler > SAL_CALL createFastChildContext (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) 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 characters (const OUString &aChars) override
 This method is called for all characters that are contained in the current element. More...
 
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() [1/4]

DomBuilderContext::DomBuilderContext ( SvXMLImport rImport,
sal_Int32  nElement 
)

default constructor: create new DOM tree

Definition at line 63 of file DomBuilderContext.cxx.

References mxNode, and SAL_WARN_IF.

Referenced by createFastChildContext(), and createUnknownChildContext().

◆ DomBuilderContext() [2/4]

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

Definition at line 74 of file DomBuilderContext.cxx.

References mxNode, and SAL_WARN_IF.

◆ DomBuilderContext() [3/4]

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

constructor: create DOM subtree under the given node

◆ DomBuilderContext() [4/4]

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::~DomBuilderContext ( )
overridevirtual

Definition at line 107 of file DomBuilderContext.cxx.

Member Function Documentation

◆ characters()

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 212 of file DomBuilderContext.cxx.

References mxNode, and SAL_WARN_IF.

◆ createFastChildContext()

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 117 of file DomBuilderContext.cxx.

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

◆ createUnknownChildContext()

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 124 of file DomBuilderContext.cxx.

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

◆ getTree()

Reference< XDocument > DomBuilderContext::getTree ( )

◆ HandleAttributes()

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

◆ startFastElement()

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

Reimplemented from SvXMLImportContext.

Definition at line 131 of file DomBuilderContext.cxx.

References HandleAttributes(), mxNode, and SAL_WARN_IF.

◆ startUnknownElement()

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 141 of file DomBuilderContext.cxx.

References HandleAttributes(), mxNode, and SAL_WARN_IF.

Member Data Documentation

◆ mxNode

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

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