org.systinet.xml
Class XMLSourceHelper

java.lang.Object
  extended byorg.systinet.xml.XMLSourceHelper

public class XMLSourceHelper
extends java.lang.Object

Provides simple way for converting Source to DOMSource and creating DOMSource holding XML element of given QName.

Since:
5.0
Component:
Core

Constructor Summary
XMLSourceHelper()
           
 
Method Summary
static javax.xml.transform.dom.DOMSource createDOMSource(java.lang.String namespaceURI, java.lang.String qualifiedName)
          Creates an DOMSource holds an element of the given qualified name and namespace URI.
static javax.xml.transform.dom.DOMSource transformToDOMSource(javax.xml.transform.Source source)
          Transforms given instance of Source to DOMSource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLSourceHelper

public XMLSourceHelper()
Method Detail

transformToDOMSource

public static final javax.xml.transform.dom.DOMSource transformToDOMSource(javax.xml.transform.Source source)
                                                                    throws javax.xml.transform.TransformerException
Transforms given instance of Source to DOMSource. If is not posssible throws exception.

Parameters:
source - source to convert
Returns:
instance od DOMSource
Throws:
javax.xml.transform.TransformerException - when conversion is not possible

createDOMSource

public static final javax.xml.transform.dom.DOMSource createDOMSource(java.lang.String namespaceURI,
                                                                      java.lang.String qualifiedName)
                                                               throws javax.xml.parsers.ParserConfigurationException,
                                                                      org.w3c.dom.DOMException
Creates an DOMSource holds an element of the given qualified name and namespace URI.

Parameters:
namespaceURI - The namespace URI of the element to create.
qualifiedName - The qualified name of the element type to instantiate.
Returns:
DOMSource
Throws:
org.w3c.dom.DOMException
javax.xml.parsers.ParserConfigurationException