LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XXMLDocumentWrapper Interface Reference

Interface of XML Document Wrapper. More...

import"XXMLDocumentWrapper.idl";

Inheritance diagram for XXMLDocumentWrapper:
XInterface XMLDocumentWrapper

Public Member Functions

XXMLElementWrapper getCurrentElement ()
 Gets the current element. More...
 
void setCurrentElement ([in] XXMLElementWrapper element)
 Sets the current element. More...
 
void removeCurrentElement ()
 Removes the current element. More...
 
boolean isCurrent ([in] XXMLElementWrapper node)
 Checks whether an element is the current element. More...
 
boolean isCurrentElementEmpty ()
 Checks whether the current element is empty. More...
 
string getNodeName ([in] XXMLElementWrapper node)
 Gets the name of the element. More...
 
void clearUselessData ([in] XXMLElementWrapper node, [in] sequence< XXMLElementWrapper > reservedDescendants, [in] XXMLElementWrapper stopAtNode)
 Clears all useless element in a branch of the DOM tree along the tree order. More...
 
void collapse ([in] XXMLElementWrapper node)
 Collapses a tree path. More...
 
void generateSAXEvents ([in] com::sun::star::xml::sax::XDocumentHandler handler, [in] com::sun::star::xml::sax::XDocumentHandler saxEventKeeperHandler, [in] XXMLElementWrapper startNode, [in] XXMLElementWrapper endNode) raises ( com::sun::star::xml::sax::SAXException )
 Converts a part of the DOM tree into SAX events. More...
 
void getTree ([in] com::sun::star::xml::sax::XDocumentHandler handler) raises ( com::sun::star::xml::sax::SAXException )
 Converts the whole DOM tree into a SAX event stream. More...
 
void rebuildIDLink ([in] XXMLElementWrapper node)
 Rebuild the ID attribute in the branch starting from the particular element. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

Interface of XML Document Wrapper.

When converting SAX events into a DOM tree, this interface is used to manipulate the DOM data in UNO perspective.

Every language has its own methods to manipulate its native DOM data structure, this interface provides a common method set which each language have to implement.

In another word, this interface wraps language dependent methods, then other component can manipulate DOM data through UNO methods.

Member Function Documentation

◆ clearUselessData()

void clearUselessData ( [in] XXMLElementWrapper  node,
[in] sequence< XXMLElementWrapper reservedDescendants,
[in] XXMLElementWrapper  stopAtNode 
)

Clears all useless element in a branch of the DOM tree along the tree order.

Parameters
nodethe start point of the branch to clear
reservedDescendantsan array including all elements that need to be reserved (along their ancestor path)
stopAtNodethe stop element. The operation have to interrupt when this element is met during clearing

◆ collapse()

void collapse ( [in] XXMLElementWrapper  node)

Collapses a tree path.

Each element in the ancestor path of the node will be checked, if this element is empty, then deletes it.

Parameters
nodethe start point of the path from where the tree path will be collapsed

◆ generateSAXEvents()

void generateSAXEvents ( [in] com::sun::star::xml::sax::XDocumentHandler  handler,
[in] com::sun::star::xml::sax::XDocumentHandler  saxEventKeeperHandler,
[in] XXMLElementWrapper  startNode,
[in] XXMLElementWrapper  endNode 
)
raises (com::sun::star::xml::sax::SAXException
)

Converts a part of the DOM tree into SAX events.

Parameters
handlerthe document handler which will receive generated SAX events
saxEventKeeperHandlerthe SAXEventKeeper connecting with this XMLDocumentHandler
startNodethe start point to generate SAX events
endNodethe end point where to stop generating

◆ getCurrentElement()

XXMLElementWrapper getCurrentElement ( )

Gets the current element.

Returns
the current element in the SAX event stream

◆ getNodeName()

string getNodeName ( [in] XXMLElementWrapper  node)

Gets the name of the element.

Parameters
nodethe element whose name will be gotten
Returns
the name of the element

◆ getTree()

Converts the whole DOM tree into a SAX event stream.

Parameters
handlerthe document handler which will receive the SAX event stream

◆ isCurrent()

boolean isCurrent ( [in] XXMLElementWrapper  node)

Checks whether an element is the current element.

Parameters
nodethe element to be checked
Returns
true if the node is the current element, false otherwise

◆ isCurrentElementEmpty()

boolean isCurrentElementEmpty ( )

Checks whether the current element is empty.

Returns
true if the current element is empty, false otherwise

◆ rebuildIDLink()

void rebuildIDLink ( [in] XXMLElementWrapper  node)

Rebuild the ID attribute in the branch starting from the particular element.

Parameters
nodethe root element of the branch whose ID link will be built

◆ removeCurrentElement()

void removeCurrentElement ( )

Removes the current element.

When the current element is removed, then its parent element becomes the new current element.

◆ setCurrentElement()

void setCurrentElement ( [in] XXMLElementWrapper  element)

Sets the current element.

When the current element is replaced outside of this interface, then uses this method can update the current element pointer.

Parameters
elementthe new current element

The documentation for this interface was generated from the following file: