|
OOoRunner test harness | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--util.XMLTools
Inner Class Summary | |
static class |
XMLTools.AttributeList
The implementation of com.sun.star.xml.sax.XAttributeList
where attributes and their values can be added. |
static class |
XMLTools.Tag
Represents an XML tag which must be found in XML data written. |
static class |
XMLTools.XMLChecker
Class realises extended XML data checking. |
static class |
XMLTools.XMLTagsChecker
Beside structure of XML this class also can check existence of tags, inner tags, and character data. |
static class |
XMLTools.XMLWellFormChecker
Checks if the XML structure is well formed (i.e. |
static class |
XMLTools.XMLWriter
This 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 XDocumentHandler implementation in form
of com.sun.star.xml.sax.Writer service, which
writes XML data into a com.sun.star.io.Pipe
created. |
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 |
public XMLTools()
Method Detail |
public static Object[] getDocumentHandler(XMultiServiceFactory xMSF)
XDocumentHandler
implementation in form
of com.sun.star.xml.sax.Writer
service, which
writes XML data into a com.sun.star.io.Pipe
created.Any
structure.public static PropertyValue[] createMediaDescriptor(String[] propNames, Object[] values)
public static com.sun.star.xml.sax.XDocumentHandler getFileXMLWriter(XMultiServiceFactory xMSF, String fileURL) throws Exception
xMSF
- Soffice ServiceManager
factory.fileURL
- The file URL (in form file:///public static void parseXMLFile(XMultiServiceFactory xMSF, String fileURL, com.sun.star.xml.sax.XDocumentHandler handler) throws Exception
xMSF
- Soffice ServiceManager
factory.fileURL
- XML file name (in form file:///handler
- SAX handler to which XML data from file will
be transferred.public static void exportDocument(XMultiServiceFactory xMSF, XComponent xDoc, String docType, String exportType, String fileURL) throws Exception
xMSF
- Soffice ServiceManager
factory.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:///public static void importDocument(XMultiServiceFactory xMSF, XComponent xDoc, String docType, String importType, String fileURL) throws Exception
xMSF
- Soffice ServiceManager
factory.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:///
|
OOoRunner test harness | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |