org.apache.camel.converter.jaxp
Class XmlConverter

java.lang.Object
  extended by org.apache.camel.converter.jaxp.XmlConverter

@Converter
public class XmlConverter
extends Object

A helper class to transform to and from various JAXB types such as Source and Document

Version:

Field Summary
static String DEFAULT_CHARSET_PROPERTY
          Deprecated. 
static String defaultCharset
           
static String OUTPUT_PROPERTIES_PREFIX
           
 
Constructor Summary
XmlConverter()
           
XmlConverter(DocumentBuilderFactory documentBuilderFactory)
           
 
Method Summary
 Document createDocument()
           
 DocumentBuilder createDocumentBuilder()
           
 DocumentBuilderFactory createDocumentBuilderFactory()
           
 Transformer createTransfomer()
          Deprecated. use createTransformer(), will be removed in Camel 3.0
 Transformer createTransformer()
           
 TransformerFactory createTransformerFactory()
           
 Properties defaultOutputProperties()
          Returns the default set of output properties for conversions.
 DocumentBuilderFactory getDocumentBuilderFactory()
           
 TransformerFactory getTransformerFactory()
           
 void setDocumentBuilderFactory(DocumentBuilderFactory documentBuilderFactory)
           
 void setTransformerFactory(TransformerFactory transformerFactory)
           
 Boolean toBoolean(NodeList list)
          Converts the given NodeList to a boolean
 byte[] toByteArray(Source source, Exchange exchange)
          Converts the given input Source into bytes
 BytesSource toBytesSource(byte[] data)
          Converts the given byte[] to a Source
 Document toDOMDocument(byte[] data)
          Converts the given data to a DOM document
 Document toDOMDocument(File file)
          Converts the given File to a DOM document
 Document toDOMDocument(InputSource in)
          Converts the given InputSource to a DOM document
 Document toDOMDocument(InputStream in)
          Converts the given InputStream to a DOM document
 Document toDOMDocument(Node node)
          Create a DOM document from the given Node.
 Document toDOMDocument(Reader in)
          Converts the given InputStream to a DOM document
 Document toDOMDocument(Source source)
          Create a DOM document from the given source.
 Document toDOMDocument(String text)
          Converts the given String to a DOM document
 Document toDOMDocumentFromSingleNodeList(NodeList nl)
          Convert a NodeList consisting of just 1 node to a DOM Document.
 Element toDOMElement(Node node)
          Create a DOM element from the DOM node.
 Element toDOMElement(Source source)
          Create a DOM element from the given source.
 Node toDOMNode(Source source)
          Converts the given TRaX Source into a W3C DOM node
 Node toDOMNodeFromSAX(SAXSource source)
           
 Node toDOMNodeFromSingleNodeList(NodeList nl)
          Convert a NodeList consisting of just 1 node to a DOM Node.
 Node toDOMNodeFromStAX(StAXSource source)
           
 DOMSource toDOMSource(byte[] bytes)
          Converts the source instance to a DOMSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 DOMSource toDOMSource(Document document)
          Converts the given Document to a DOMSource
 DOMSource toDOMSource(File file)
           
 DOMSource toDOMSource(InputStream is)
           
 DOMSource toDOMSource(Node node)
          Converts the given Node to a Source
 DOMSource toDOMSource(Source source)
          Converts the source instance to a DOMSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 DOMSource toDOMSource(String text)
          Converts the source instance to a DOMSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 DOMSource toDOMSourceFromSAX(SAXSource source)
           
 DOMSource toDOMSourceFromStAX(StAXSource source)
           
 DOMSource toDOMSourceFromStream(StreamSource source)
           
 InputSource toInputSource(File file, Exchange exchange)
           
 InputSource toInputSource(InputStream is, Exchange exchange)
           
 InputStream toInputStream(Document dom)
          Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.
 InputStream toInputStream(Document dom, Exchange exchange)
           
 InputStream toInputStream(DOMSource source)
          Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.
 InputStream toInputStream(DOMSource source, Exchange exchange)
           
 Reader toReaderFromSource(Source src)
          Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.
 Reader toReaderFromSource(Source src, Exchange exchange)
           
 void toResult(Source source, Result result)
          Converts the given input Source into the required result
 void toResult(Source source, Result result, Properties outputProperties)
          Converts the given input Source into the required result
 SAXSource toSAXSource(byte[] in, Exchange exchange)
          Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 SAXSource toSAXSource(File file, Exchange exchange)
          Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 SAXSource toSAXSource(InputStream source)
          Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.
 SAXSource toSAXSource(InputStream source, Exchange exchange)
          Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 SAXSource toSAXSource(Source source)
          Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.
 SAXSource toSAXSource(Source source, Exchange exchange)
          Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 SAXSource toSAXSource(String source)
          Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.
 SAXSource toSAXSource(String source, Exchange exchange)
          Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 SAXSource toSAXSourceFromDOM(DOMSource source)
          Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.
 SAXSource toSAXSourceFromDOM(DOMSource source, Exchange exchange)
           
 SAXSource toSAXSourceFromStAX(StAXSource source, Exchange exchange)
           
 SAXSource toSAXSourceFromStream(StreamSource source)
           
 DOMSource toSource(Document document)
          Deprecated. use toDOMSource instead
 Source toSource(Node node)
          Deprecated. use toDOMSource instead
 Source toSource(String data)
          Converts the given String to a Source
 StAXSource toStAXSource(byte[] in, Exchange exchange)
          Converts the source instance to a StAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 StAXSource toStAXSource(File file, Exchange exchange)
          Converts the source instance to a StAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 StAXSource toStAXSource(InputStream source, Exchange exchange)
          Converts the source instance to a StAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 StAXSource toStAXSource(String source, Exchange exchange)
          Converts the source instance to a StAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 StreamSource toStreamSource(byte[] in, Exchange exchange)
           
 StreamSource toStreamSource(ByteBuffer in, Exchange exchange)
           
 StreamSource toStreamSource(File in)
           
 StreamSource toStreamSource(InputStream in)
           
 StreamSource toStreamSource(Reader in)
           
 StreamSource toStreamSource(Source source)
          Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.
 StreamSource toStreamSource(Source source, Exchange exchange)
           
 StreamSource toStreamSourceFromDOM(DOMSource source)
          Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.
 StreamSource toStreamSourceFromDOM(DOMSource source, Exchange exchange)
           
 StreamSource toStreamSourceFromSAX(SAXSource source)
          Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.
 StreamSource toStreamSourceFromSAX(SAXSource source, Exchange exchange)
           
 StreamSource toStreamSourceFromStAX(StAXSource source, Exchange exchange)
           
 String toString(Node node)
          Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.
 String toString(Node node, Exchange exchange)
          Converts the given input Node into text
 String toString(Source source)
          Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.
 String toString(Source source, Exchange exchange)
          Converts the given input Source into text
 StringSource toStringSource(String data)
          Converts the given String to a Source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CHARSET_PROPERTY

@Deprecated
public static final String DEFAULT_CHARSET_PROPERTY
Deprecated. 
See Also:
Constant Field Values

OUTPUT_PROPERTIES_PREFIX

public static final String OUTPUT_PROPERTIES_PREFIX
See Also:
Constant Field Values

defaultCharset

public static String defaultCharset
Constructor Detail

XmlConverter

public XmlConverter()

XmlConverter

public XmlConverter(DocumentBuilderFactory documentBuilderFactory)
Method Detail

defaultOutputProperties

public Properties defaultOutputProperties()
Returns the default set of output properties for conversions.


toResult

public void toResult(Source source,
                     Result result)
              throws TransformerException
Converts the given input Source into the required result

Throws:
TransformerException

toResult

public void toResult(Source source,
                     Result result,
                     Properties outputProperties)
              throws TransformerException
Converts the given input Source into the required result

Throws:
TransformerException

toBoolean

@Converter
public Boolean toBoolean(NodeList list)
Converts the given NodeList to a boolean


toBytesSource

@Converter
public BytesSource toBytesSource(byte[] data)
Converts the given byte[] to a Source


toStringSource

@Converter
public StringSource toStringSource(String data)
Converts the given String to a Source


toSource

@Deprecated
public DOMSource toSource(Document document)
Deprecated. use toDOMSource instead

Converts the given Document to a Source


toSource

@Deprecated
public Source toSource(Node node)
                throws ParserConfigurationException,
                       TransformerException
Deprecated. use toDOMSource instead

Converts the given Node to a Source

Throws:
TransformerException
ParserConfigurationException

toDOMSource

@Converter
public DOMSource toDOMSource(Node node)
                      throws ParserConfigurationException,
                             TransformerException
Converts the given Node to a Source

Throws:
TransformerException
ParserConfigurationException

toDOMSource

@Converter
public DOMSource toDOMSource(Document document)
Converts the given Document to a DOMSource


toSource

@Converter
public Source toSource(String data)
Converts the given String to a Source


toString

@Deprecated
public String toString(Source source)
                throws TransformerException
Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.

Converts the given input Source into text.

Throws:
TransformerException

toString

@Converter
public String toString(Source source,
                                 Exchange exchange)
                throws TransformerException
Converts the given input Source into text

Throws:
TransformerException

toByteArray

@Converter
public byte[] toByteArray(Source source,
                                    Exchange exchange)
                   throws TransformerException
Converts the given input Source into bytes

Throws:
TransformerException

toString

@Deprecated
public String toString(Node node)
                throws TransformerException
Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.

Converts the given input Node into text

Throws:
TransformerException

toString

@Converter
public String toString(Node node,
                                 Exchange exchange)
                throws TransformerException
Converts the given input Node into text

Throws:
TransformerException

toDOMSource

@Converter
public DOMSource toDOMSource(Source source)
                      throws ParserConfigurationException,
                             IOException,
                             SAXException,
                             TransformerException
Converts the source instance to a DOMSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
ParserConfigurationException
IOException
SAXException
TransformerException

toDOMSource

@Converter
public DOMSource toDOMSource(String text)
                      throws ParserConfigurationException,
                             IOException,
                             SAXException,
                             TransformerException
Converts the source instance to a DOMSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
ParserConfigurationException
IOException
SAXException
TransformerException

toDOMSource

@Converter
public DOMSource toDOMSource(byte[] bytes)
                      throws IOException,
                             SAXException,
                             ParserConfigurationException
Converts the source instance to a DOMSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
IOException
SAXException
ParserConfigurationException

toSAXSource

@Deprecated
public SAXSource toSAXSource(String source)
                      throws IOException,
                             SAXException,
                             TransformerException
Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.

Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
IOException
SAXException
TransformerException

toSAXSource

@Converter
public SAXSource toSAXSource(String source,
                                       Exchange exchange)
                      throws IOException,
                             SAXException,
                             TransformerException
Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
IOException
SAXException
TransformerException

toStAXSource

@Converter
public StAXSource toStAXSource(String source,
                                         Exchange exchange)
                        throws XMLStreamException
Converts the source instance to a StAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
XMLStreamException

toStAXSource

@Converter
public StAXSource toStAXSource(byte[] in,
                                         Exchange exchange)
                        throws XMLStreamException
Converts the source instance to a StAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
XMLStreamException

toSAXSource

@Deprecated
public SAXSource toSAXSource(InputStream source)
                      throws IOException,
                             SAXException,
                             TransformerException
Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.

Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
IOException
SAXException
TransformerException

toSAXSource

@Converter
public SAXSource toSAXSource(InputStream source,
                                       Exchange exchange)
                      throws IOException,
                             SAXException,
                             TransformerException
Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
IOException
SAXException
TransformerException

toSAXSource

@Converter
public SAXSource toSAXSource(byte[] in,
                                       Exchange exchange)
                      throws IOException,
                             SAXException,
                             TransformerException
Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
IOException
SAXException
TransformerException

toStAXSource

@Converter
public StAXSource toStAXSource(InputStream source,
                                         Exchange exchange)
                        throws XMLStreamException
Converts the source instance to a StAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
XMLStreamException

toSAXSource

@Converter
public SAXSource toSAXSource(File file,
                                       Exchange exchange)
                      throws IOException,
                             SAXException,
                             TransformerException
Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
IOException
SAXException
TransformerException

toStAXSource

@Converter
public StAXSource toStAXSource(File file,
                                         Exchange exchange)
                        throws FileNotFoundException,
                               XMLStreamException
Converts the source instance to a StAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
FileNotFoundException
XMLStreamException

toSAXSource

@Deprecated
public SAXSource toSAXSource(Source source)
                      throws IOException,
                             SAXException,
                             TransformerException
Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.

Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
IOException
SAXException
TransformerException

toSAXSource

@Converter
public SAXSource toSAXSource(Source source,
                                       Exchange exchange)
                      throws IOException,
                             SAXException,
                             TransformerException
Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
IOException
SAXException
TransformerException

toStreamSource

@Deprecated
public StreamSource toStreamSource(Source source)
                            throws TransformerException
Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.

Throws:
TransformerException

toStreamSource

@Converter
public StreamSource toStreamSource(Source source,
                                             Exchange exchange)
                            throws TransformerException
Throws:
TransformerException

toStreamSource

@Converter
public StreamSource toStreamSource(InputStream in)
                            throws TransformerException
Throws:
TransformerException

toStreamSource

@Converter
public StreamSource toStreamSource(Reader in)
                            throws TransformerException
Throws:
TransformerException

toStreamSource

@Converter
public StreamSource toStreamSource(File in)
                            throws TransformerException
Throws:
TransformerException

toStreamSource

@Converter
public StreamSource toStreamSource(byte[] in,
                                             Exchange exchange)
                            throws TransformerException
Throws:
TransformerException

toStreamSource

@Converter
public StreamSource toStreamSource(ByteBuffer in,
                                             Exchange exchange)
                            throws TransformerException
Throws:
TransformerException

toStreamSourceFromSAX

@Deprecated
public StreamSource toStreamSourceFromSAX(SAXSource source)
                                   throws TransformerException
Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.

Throws:
TransformerException

toStreamSourceFromSAX

@Converter
public StreamSource toStreamSourceFromSAX(SAXSource source,
                                                    Exchange exchange)
                                   throws TransformerException
Throws:
TransformerException

toStreamSourceFromDOM

@Deprecated
public StreamSource toStreamSourceFromDOM(DOMSource source)
                                   throws TransformerException
Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.

Throws:
TransformerException

toStreamSourceFromDOM

@Converter
public StreamSource toStreamSourceFromDOM(DOMSource source,
                                                    Exchange exchange)
                                   throws TransformerException
Throws:
TransformerException

toStreamSourceFromStAX

@Converter
public StreamSource toStreamSourceFromStAX(StAXSource source,
                                                     Exchange exchange)
                                    throws TransformerException
Throws:
TransformerException

toSAXSourceFromStream

@Converter
public SAXSource toSAXSourceFromStream(StreamSource source)

toReaderFromSource

@Deprecated
public Reader toReaderFromSource(Source src)
                          throws TransformerException
Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.

Throws:
TransformerException

toReaderFromSource

@Converter
public Reader toReaderFromSource(Source src,
                                           Exchange exchange)
                          throws TransformerException
Throws:
TransformerException

toDOMSource

@Converter
public DOMSource toDOMSource(InputStream is)
                      throws ParserConfigurationException,
                             IOException,
                             SAXException
Throws:
ParserConfigurationException
IOException
SAXException

toDOMSource

@Converter
public DOMSource toDOMSource(File file)
                      throws ParserConfigurationException,
                             IOException,
                             SAXException
Throws:
ParserConfigurationException
IOException
SAXException

toDOMSourceFromStream

@Converter
public DOMSource toDOMSourceFromStream(StreamSource source)
                                throws ParserConfigurationException,
                                       IOException,
                                       SAXException
Throws:
ParserConfigurationException
IOException
SAXException

toSAXSourceFromDOM

@Deprecated
public SAXSource toSAXSourceFromDOM(DOMSource source)
                             throws TransformerException
Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.

Throws:
TransformerException

toSAXSourceFromDOM

@Converter
public SAXSource toSAXSourceFromDOM(DOMSource source,
                                              Exchange exchange)
                             throws TransformerException
Throws:
TransformerException

toSAXSourceFromStAX

@Converter
public SAXSource toSAXSourceFromStAX(StAXSource source,
                                               Exchange exchange)
                              throws TransformerException
Throws:
TransformerException

toDOMSourceFromSAX

@Converter
public DOMSource toDOMSourceFromSAX(SAXSource source)
                             throws IOException,
                                    SAXException,
                                    ParserConfigurationException,
                                    TransformerException
Throws:
IOException
SAXException
ParserConfigurationException
TransformerException

toDOMSourceFromStAX

@Converter
public DOMSource toDOMSourceFromStAX(StAXSource source)
                              throws IOException,
                                     SAXException,
                                     ParserConfigurationException,
                                     TransformerException
Throws:
IOException
SAXException
ParserConfigurationException
TransformerException

toDOMNodeFromSAX

@Converter
public Node toDOMNodeFromSAX(SAXSource source)
                      throws ParserConfigurationException,
                             IOException,
                             SAXException,
                             TransformerException
Throws:
ParserConfigurationException
IOException
SAXException
TransformerException

toDOMNodeFromStAX

@Converter
public Node toDOMNodeFromStAX(StAXSource source)
                       throws ParserConfigurationException,
                              IOException,
                              SAXException,
                              TransformerException
Throws:
ParserConfigurationException
IOException
SAXException
TransformerException

toDOMNodeFromSingleNodeList

@Converter
public Node toDOMNodeFromSingleNodeList(NodeList nl)
Convert a NodeList consisting of just 1 node to a DOM Node.

Parameters:
nl - the NodeList
Returns:
the DOM Node

toDOMDocumentFromSingleNodeList

@Converter
public Document toDOMDocumentFromSingleNodeList(NodeList nl)
                                         throws ParserConfigurationException,
                                                TransformerException
Convert a NodeList consisting of just 1 node to a DOM Document. Cannot convert NodeList with length > 1 because they require a root node.

Parameters:
nl - the NodeList
Returns:
the DOM Document
Throws:
ParserConfigurationException
TransformerException

toDOMNode

@Converter
public Node toDOMNode(Source source)
               throws TransformerException,
                      ParserConfigurationException,
                      IOException,
                      SAXException
Converts the given TRaX Source into a W3C DOM node

Throws:
TransformerException
ParserConfigurationException
IOException
SAXException

toDOMElement

@Converter
public Element toDOMElement(Source source)
                     throws TransformerException,
                            ParserConfigurationException,
                            IOException,
                            SAXException
Create a DOM element from the given source.

Throws:
TransformerException
ParserConfigurationException
IOException
SAXException

toDOMElement

@Converter
public Element toDOMElement(Node node)
                     throws TransformerException
Create a DOM element from the DOM node. Simply cast if the node is an Element, or return the root element if it is a Document.

Throws:
TransformerException

toDOMDocument

@Converter
public Document toDOMDocument(byte[] data)
                       throws IOException,
                              SAXException,
                              ParserConfigurationException
Converts the given data to a DOM document

Parameters:
data - is the data to be parsed
Returns:
the parsed document
Throws:
IOException
SAXException
ParserConfigurationException

toDOMDocument

@Converter
public Document toDOMDocument(InputStream in)
                       throws IOException,
                              SAXException,
                              ParserConfigurationException
Converts the given InputStream to a DOM document

Parameters:
in - is the data to be parsed
Returns:
the parsed document
Throws:
IOException
SAXException
ParserConfigurationException

toDOMDocument

@Converter
public Document toDOMDocument(Reader in)
                       throws IOException,
                              SAXException,
                              ParserConfigurationException
Converts the given InputStream to a DOM document

Parameters:
in - is the data to be parsed
Returns:
the parsed document
Throws:
IOException
SAXException
ParserConfigurationException

toDOMDocument

@Converter
public Document toDOMDocument(InputSource in)
                       throws IOException,
                              SAXException,
                              ParserConfigurationException
Converts the given InputSource to a DOM document

Parameters:
in - is the data to be parsed
Returns:
the parsed document
Throws:
IOException
SAXException
ParserConfigurationException

toDOMDocument

@Converter
public Document toDOMDocument(String text)
                       throws IOException,
                              SAXException,
                              ParserConfigurationException
Converts the given String to a DOM document

Parameters:
text - is the data to be parsed
Returns:
the parsed document
Throws:
IOException
SAXException
ParserConfigurationException

toDOMDocument

@Converter
public Document toDOMDocument(File file)
                       throws IOException,
                              SAXException,
                              ParserConfigurationException
Converts the given File to a DOM document

Parameters:
file - is the data to be parsed
Returns:
the parsed document
Throws:
IOException
SAXException
ParserConfigurationException

toDOMDocument

@Converter
public Document toDOMDocument(Source source)
                       throws TransformerException,
                              ParserConfigurationException,
                              IOException,
                              SAXException
Create a DOM document from the given source.

Throws:
TransformerException
ParserConfigurationException
IOException
SAXException

toDOMDocument

@Converter
public Document toDOMDocument(Node node)
                       throws ParserConfigurationException,
                              TransformerException
Create a DOM document from the given Node. If the node is an document, just cast it, if the node is an root element, retrieve its owner element or create a new document and import the node.

Throws:
ParserConfigurationException
TransformerException

toInputStream

@Deprecated
public InputStream toInputStream(DOMSource source)
                          throws TransformerException,
                                 IOException
Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.

Throws:
TransformerException
IOException

toInputStream

@Converter
public InputStream toInputStream(DOMSource source,
                                           Exchange exchange)
                          throws TransformerException,
                                 IOException
Throws:
TransformerException
IOException

toInputStream

@Deprecated
public InputStream toInputStream(Document dom)
                          throws TransformerException,
                                 IOException
Deprecated. will be removed in Camel 3.0. Use the method which has 2 parameters.

Throws:
TransformerException
IOException

toInputStream

@Converter
public InputStream toInputStream(Document dom,
                                           Exchange exchange)
                          throws TransformerException,
                                 IOException
Throws:
TransformerException
IOException

toInputSource

@Converter
public InputSource toInputSource(InputStream is,
                                           Exchange exchange)

toInputSource

@Converter
public InputSource toInputSource(File file,
                                           Exchange exchange)
                          throws FileNotFoundException
Throws:
FileNotFoundException

getDocumentBuilderFactory

public DocumentBuilderFactory getDocumentBuilderFactory()

setDocumentBuilderFactory

public void setDocumentBuilderFactory(DocumentBuilderFactory documentBuilderFactory)

createDocumentBuilderFactory

public DocumentBuilderFactory createDocumentBuilderFactory()

createDocumentBuilder

public DocumentBuilder createDocumentBuilder()
                                      throws ParserConfigurationException
Throws:
ParserConfigurationException

createDocument

public Document createDocument()
                        throws ParserConfigurationException
Throws:
ParserConfigurationException

getTransformerFactory

public TransformerFactory getTransformerFactory()

setTransformerFactory

public void setTransformerFactory(TransformerFactory transformerFactory)

createTransfomer

@Deprecated
public Transformer createTransfomer()
                             throws TransformerConfigurationException
Deprecated. use createTransformer(), will be removed in Camel 3.0

Throws:
TransformerConfigurationException

createTransformer

public Transformer createTransformer()
                              throws TransformerConfigurationException
Throws:
TransformerConfigurationException

createTransformerFactory

public TransformerFactory createTransformerFactory()


Apache CAMEL