Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.xssf.extractor
Class XSSFExportToXml

    java.lang.Object
      org.apache.poi.xssf.extractor.XSSFExportToXml

All Implemented Interfaces:
  java.util.Comparator<java.lang.String>

    public class XSSFExportToXml

extends java.lang.Object
implements java.util.Comparator<java.lang.String>

Maps an XLSX to an XML according to one of the mapping defined. The output XML Schema must respect this limitations:

- all mandatory elements and attributes must be mapped (enable validation to check this)
- no <any> in complex type/element declaration
- no <anyAttribute> attributes declaration
- no recursive structures: recursive structures can't be nested more than one level
- no abstract elements: abstract complex types can be declared but must not be used in elements.
- no mixed content: an element can't contain simple text and child element(s) together
- no <substitutionGroup> in complex type/element declaration

Constructor Summary
`XSSFExportToXml(XSSFMap map)` Creates a new exporter and sets the mapping to be used when generating the XML output document

Method Summary
`int` | `compare(java.lang.String leftXpath, java.lang.String rightXpath)` Compares two xpaths to define an ordering according to the XML Schema
`void` | `exportToXML(java.io.OutputStream os, boolean validate)` Exports the data in an XML stream
`void` | `exportToXML(java.io.OutputStream os, java.lang.String encoding, boolean validate)` Exports the data in an XML stream

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Comparator
`equals`

Constructor Detail

### XSSFExportToXml

    public XSSFExportToXml(XSSFMap map)

  Creates a new exporter and sets the mapping to be used when generating the XML output document

  Parameters:
    `map` - the mapping rule to be used

Method Detail

### exportToXML

    public void exportToXML(java.io.OutputStream os,
                            boolean validate)
                     throws org.xml.sax.SAXException,
                            javax.xml.parsers.ParserConfigurationException,
                            javax.xml.transform.TransformerException

  Exports the data in an XML stream

  Parameters:
    `os` - OutputStream in which will contain the output XML
    `validate` - if true, validates the XML againts the XML Schema
  Throws:
    `org.xml.sax.SAXException`
    `javax.xml.transform.TransformerException`
    `javax.xml.parsers.ParserConfigurationException`

### exportToXML

    public void exportToXML(java.io.OutputStream os,
                            java.lang.String encoding,
                            boolean validate)
                     throws org.xml.sax.SAXException,
                            javax.xml.parsers.ParserConfigurationException,
                            javax.xml.transform.TransformerException

  Exports the data in an XML stream

  Parameters:
    `os` - OutputStream in which will contain the output XML
    `encoding` - the output charset encoding
    `validate` - if true, validates the XML againts the XML Schema
  Throws:
    `org.xml.sax.SAXException`
    `javax.xml.parsers.ParserConfigurationException`
    `javax.xml.transform.TransformerException`
    `InvalidFormatException`

### compare

    public int compare(java.lang.String leftXpath,
                       java.lang.String rightXpath)

  Compares two xpaths to define an ordering according to the XML Schema

  Specified by:
    `compare` in interface `java.util.Comparator<java.lang.String>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2010 The Apache Software Foundation or its licensors, as applicable.