com.ddtek.xmlconverter
Interface ConvertToXML

All Superinterfaces:
Converter

public interface ConvertToXML
extends Converter

An extension of the Converter interface which specifies methods used only in conversions from non-XML data to XML.


Method Summary
 SAXSource getSAXSource(Source source)
          Get a SAXSource to read the converted data.
 javax.xml.stream.XMLStreamReader getXMLStreamReader(Source source)
          Get an XMLStreamReader to read the converted data.
 
Methods inherited from interface com.ddtek.xmlconverter.Converter
analyze, convert, convert, getConfiguration, getErrorHandler, getErrorListener, getOutputStream, setErrorHandler, setErrorListener
 

Method Detail

getXMLStreamReader

javax.xml.stream.XMLStreamReader getXMLStreamReader(Source source)
                                                    throws javax.xml.stream.XMLStreamException
Get an XMLStreamReader to read the converted data. This method starts the conversion, but does not actually convert the data. Instead, it returns an XMLStreamReader to the application. The data will be converted, in streaming fashion, as needed by the application.

Parameters:
source - A Source object which specifies the source of non-XML data.
Returns:
An XMLStreamReader to read the converted data.
Throws:
javax.xml.stream.XMLStreamException
See Also:
ConverterResolver.getXMLStreamReader(String, String)

getSAXSource

SAXSource getSAXSource(Source source)
                       throws ConverterException
Get a SAXSource to read the converted data. This method does not start the conversion, that occurs when the application calls SAXSource.getXMLReader().setContentHandler() to register the ContentHandler and then calls SAXSource.getXMLReader().parse(null)

Parameters:
source - A Source object specifying the source of non-XML data.
Returns:
A SAXSource containing an XMLReader.
Throws:
ConverterException - if an error occurs
See Also:
ConverterResolver.getSAXSource(String, String)