| 
 | OOoRunner test harness | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
util
Class  XMLTools
java.lang.Object | +--util.XMLTools
- public class XMLTools- extends Object
| Inner Class Summary | |
| static class | XMLTools.AttributeListThe implementation of com.sun.star.xml.sax.XAttributeListwhere attributes and their values can be added. | 
| static class | XMLTools.TagRepresents an XML tag which must be found in XML data written. | 
| static class | XMLTools.XMLCheckerClass realises extended XML data checking. | 
| static class | XMLTools.XMLTagsCheckerBeside structure of XML this class also can check existence of tags, inner tags, and character data. | 
| static class | XMLTools.XMLWellFormCheckerChecks if the XML structure is well formed (i.e. | 
| static class | XMLTools.XMLWriterThis class writes all XML data handled into a stream specified in the constructor. | 
| Constructor Summary | |
| XMLTools() | |
| Method Summary | |
| static PropertyValue[] | createMediaDescriptor(String[] propNames,
                      Object[] values) | 
| static void | exportDocument(XMultiServiceFactory xMSF,
               XComponent xDoc,
               String docType,
               String exportType,
               String fileURL)Exports document (the whole or a part) into the file specified in XML format. | 
| static Object[] | getDocumentHandler(XMultiServiceFactory xMSF)Creates XDocumentHandlerimplementation in form
 ofcom.sun.star.xml.sax.Writerservice, which
 writes XML data into acom.sun.star.io.Pipecreated. | 
| static com.sun.star.xml.sax.XDocumentHandler | getFileXMLWriter(XMultiServiceFactory xMSF,
                 String fileURL)Gets the hanlder, which writes all the XML data passed to the file specified. | 
| static void | importDocument(XMultiServiceFactory xMSF,
               XComponent xDoc,
               String docType,
               String importType,
               String fileURL)Imports document (the whole or a part) from the file specified in XML format. | 
| static void | parseXMLFile(XMultiServiceFactory xMSF,
             String fileURL,
             com.sun.star.xml.sax.XDocumentHandler handler)Parses XML file and passes its data to the SAX handler specified. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
XMLTools
public XMLTools()
| Method Detail | 
getDocumentHandler
public static Object[] getDocumentHandler(XMultiServiceFactory xMSF)
- Creates XDocumentHandlerimplementation in form ofcom.sun.star.xml.sax.Writerservice, which writes XML data into acom.sun.star.io.Pipecreated.- Returns:
- Single element array which contains the handler
 contained in Anystructure.
 
createMediaDescriptor
public static PropertyValue[] createMediaDescriptor(String[] propNames, Object[] values)
getFileXMLWriter
public static com.sun.star.xml.sax.XDocumentHandler getFileXMLWriter(XMultiServiceFactory xMSF, String fileURL) throws Exception
- Gets the hanlder, which writes all the XML data passed to the
 file specified.- Parameters:
- xMSF- Soffice- ServiceManagerfactory.- fileURL- The file URL (in form file:///- ) to which XML data is written. 
- Returns:
- SAX handler to which XML data has to be written.
 
parseXMLFile
public static void parseXMLFile(XMultiServiceFactory xMSF, String fileURL, com.sun.star.xml.sax.XDocumentHandler handler) throws Exception
- Parses XML file and passes its data to the SAX handler specified.- Parameters:
- xMSF- Soffice- ServiceManagerfactory.- fileURL- XML file name (in form file:///- ) to be parsed. - handler- SAX handler to which XML data from file will be transferred.
 
exportDocument
public static void exportDocument(XMultiServiceFactory xMSF, XComponent xDoc, String docType, String exportType, String fileURL) throws Exception
- Exports document (the whole or a part) into the file specified
 in XML format.- Parameters:
- xMSF- Soffice- ServiceManagerfactory.- xDoc- Document to be exported.- docType- Type of document (for example 'Calc', 'Writer', 'Draw') The type must start with capital letter.- exportType- The type of export specifies if the whole document will be exported or one of its parts (Meta info, Styles, etc.). The following types supported (it also depends of document type) : "" (empty string) - for the whole document ; "Content" - only content exported ; "Meta" - meta document info exported ; "Settings" - view settings of document exported ; "Styles" - document styles exported ;- fileURL- XML file name (in form file:///- ) to be exported to. 
 
importDocument
public static void importDocument(XMultiServiceFactory xMSF, XComponent xDoc, String docType, String importType, String fileURL) throws Exception
- Imports document (the whole or a part) from the file specified
 in XML format.- Parameters:
- xMSF- Soffice- ServiceManagerfactory.- xDoc- Target document to be imported.- docType- Type of document (for example 'Calc', 'Writer', 'Draw') The type must start with capital letter.- exportType- The type of export specifies if the whole document will be exported or one of its parts (Meta info, Styles, etc.). The following types supported (it hardly depends of XML data in file) : "" (empty string) - for the whole document ; "Content" - only content exported ; "Meta" - meta document info exported ; "Settings" - view settings of document exported ; "Styles" - document styles exported ;- fileURL- XML file name (in form file:///- ) to be imported from. 
 
| 
 | OOoRunner test harness | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

