jxl.demo
Class XML

java.lang.Object
  |
  +--jxl.demo.XML

public class XML
extends java.lang.Object

Simple demo class which uses the api to present the contents of an excel 97 spreadsheet as an XML document, using a workbook and output stream of your choice


Field Summary
private  java.lang.String encoding
          The encoding to write
private  java.io.OutputStream out
          The output stream to write to
private  Workbook workbook
          The workbook we are reading from
 
Constructor Summary
XML(Workbook w, java.io.OutputStream out, java.lang.String enc, boolean f)
          Constructor
 
Method Summary
private  void writeFormattedXML()
          Writes out the workbook data as XML, with formatting information
private  void writeXML()
          Writes out the workbook data as XML, without formatting information
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

out

private java.io.OutputStream out
The output stream to write to

encoding

private java.lang.String encoding
The encoding to write

workbook

private Workbook workbook
The workbook we are reading from
Constructor Detail

XML

public XML(Workbook w,
           java.io.OutputStream out,
           java.lang.String enc,
           boolean f)
    throws java.io.IOException
Constructor
Parameters:
w - The workbook to interrogate
out - The output stream to which the XML values are written
enc - The encoding used by the output stream. Null or unrecognized values cause the encoding to default to UTF8
f - Indicates whether the generated XML document should contain the cell format information
Throws:
java.io.IOException -  
Method Detail

writeXML

private void writeXML()
               throws java.io.IOException
Writes out the workbook data as XML, without formatting information

writeFormattedXML

private void writeFormattedXML()
                        throws java.io.IOException
Writes out the workbook data as XML, with formatting information