Removed @author tag.
Dealt with exceprions properly. General reformatting. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@827907 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3e82ec8035
commit
47086ce5bd
@ -74,8 +74,6 @@ import org.xml.sax.SAXException;
|
||||
* <li> no mixed content: an element can't contain simple text and child element(s) together </li>
|
||||
* <li> no <substitutionGroup> in complex type/element declaration </li>
|
||||
* </ul>
|
||||
*
|
||||
* @author Roberto Manicardi
|
||||
*/
|
||||
public class XSSFExportToXml implements Comparator<String>{
|
||||
|
||||
@ -97,8 +95,10 @@ public class XSSFExportToXml implements Comparator<String>{
|
||||
* @param os OutputStream in which will contain the output XML
|
||||
* @param validate if true, validates the XML againts the XML Schema
|
||||
* @throws SAXException
|
||||
* @throws TransformerException
|
||||
* @throws ParserConfigurationException
|
||||
*/
|
||||
public void exportToXML(OutputStream os, boolean validate) throws SAXException{
|
||||
public void exportToXML(OutputStream os, boolean validate) throws SAXException, ParserConfigurationException, TransformerException {
|
||||
exportToXML(os, "UTF-8", validate);
|
||||
}
|
||||
|
||||
@ -118,16 +118,16 @@ public class XSSFExportToXml implements Comparator<String>{
|
||||
* @param encoding the output charset encoding
|
||||
* @param validate if true, validates the XML againts the XML Schema
|
||||
* @throws SAXException
|
||||
* @throws ParserConfigurationException
|
||||
* @throws TransformerException
|
||||
* @throws InvalidFormatException
|
||||
*/
|
||||
public void exportToXML(OutputStream os, String encoding, boolean validate) throws SAXException{
|
||||
public void exportToXML(OutputStream os, String encoding, boolean validate) throws SAXException, ParserConfigurationException, TransformerException{
|
||||
List<XSSFSingleXmlCell> singleXMLCells = map.getRelatedSingleXMLCell();
|
||||
List<Table> tables = map.getRelatedTables();
|
||||
|
||||
String rootElement = map.getCtMap().getRootElement();
|
||||
|
||||
try{
|
||||
|
||||
Document doc = getEmptyDocument();
|
||||
|
||||
Element root = null;
|
||||
@ -243,15 +243,9 @@ public class XSSFExportToXml implements Comparator<String>{
|
||||
trans.transform(source, result);
|
||||
|
||||
}
|
||||
}catch(ParserConfigurationException e) {
|
||||
e.printStackTrace();
|
||||
}catch(TransformerException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate the generated XML against the XML Schema associated with the XSSFMap
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user