Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: xml :: wrapper ::

unpublished interface XXMLDocumentWrapper
Usage Restrictions
not published
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 lauguage has its own methods to manipulate its native DOM * data structure, this interface provides a common method set which * each lauguage have to implement. *

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


Methods' Summary
getCurrentElement * Gets the current element. * *  
setCurrentElement * Sets the current element. *  
removeCurrentElement * Removes the current element. *  
isCurrent * Checks whether an element is the current element. * *  
isCurrentElementEmpty * Checks whether the current element is empty. * *  
getNodeName * Gets the name of the element. * *  
clearUselessData * Clears all useless element in a branch of the DOM tree along the * tree order. * *  
collapse * Collapses a tree path *  
generateSAXEvents * Converts a part of the DOM tree into SAX events. * *  
getTree * Converts the whole DOM tree into a SAX event stream. * *  
rebuildIDLink * Rebuild the ID attribute in the branch starting from the particular * element. * *  
Methods' Details
getCurrentElement
XXMLElementWrapper
getCurrentElement();

Description
* Gets the current element. * *
Returns
the current element in the SAX event stream
setCurrentElement
void
setCurrentElement( [in] XXMLElementWrapper  element );

Description
* Sets the current element. *

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

Parameter element
the new current element
removeCurrentElement
void
removeCurrentElement();

Description
* Removes the current element. *

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

isCurrent
boolean
isCurrent( [in] XXMLElementWrapper  node );

Description
* Checks whether an element is the current element. * *
Parameter node
the element to be checked *
Returns
true if the node is the current element, * false otherwise
isCurrentElementEmpty
boolean
isCurrentElementEmpty();

Description
* Checks whether the current element is empty. * *
Returns
true if the current element is empty, * false otherwise
getNodeName
string
getNodeName( [in] XXMLElementWrapper  node );

Description
* Gets the name of the element. * *
Parameter node
the element whose name will be gotten *
Returns
the name of the element
clearUselessData
void
clearUselessData( [in] XXMLElementWrapper  node,
[in] sequence< XXMLElementWrapper >  reservedDescendants,
[in] XXMLElementWrapper  stopAtNode );

Description
* Clears all useless element in a branch of the DOM tree along the * tree order. * *
Parameter node
the start point of the branch to clear *
Parameter reservedDescendants
an array including all elements that * need to be reserved (along their * ancestor path) *
Parameter stopAtNode
the stop element. The operation have * to interrupt when this element is met * during clearing
collapse
void
collapse( [in] XXMLElementWrapper  node );

Description
* Collapses a tree path *

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

Parameter node
the 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 );

Description
* Converts a part of the DOM tree into SAX events. * *
Parameter handler
the document handler which will receive * generated SAX events *
Parameter saxEventKeeperHandler
the SAXEventKeeper connecting with * this XMLDocumentHandler *
Parameter startNode
the start point to generate SAX events *
Parameter endNode
the end point where to stop generating
getTree
void
getTree( [in] ::com::sun::star::xml::sax::XDocumentHandler  handler )
raises( ::com::sun::star::xml::sax::SAXException );

Description
* Converts the whole DOM tree into a SAX event stream. * *
Parameter handler
the document handelr which will receive the SAX event * stream
rebuildIDLink
void
rebuildIDLink( [in] XXMLElementWrapper  node );

Description
* Rebuild the ID attribute in the branch starting from the particular * element. * *
Parameter node
the root element of the branch whose ID link will be * built
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.