org.inria.ns.reflex.xml
Class XMLUtil

java.lang.Object
  extended by org.inria.ns.reflex.xml.XMLUtil

public abstract class XMLUtil
extends Object

XML utilities : a set of static methods.

Author:
Philippe Poulard

Method Summary
static Source getXMLSource(Object source, URIResolver uriResolver)
          Wrap the given object to an XML source.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getXMLSource

public static Source getXMLSource(Object source,
                                  URIResolver uriResolver)
                           throws FileSystemException,
                                  TransformerException
Wrap the given object to an XML source.

Parameters:
source - The object to convert, that can be :
  • a Source
  • a Node
  • an XMLReader
  • a List of Node
  • a Reader
  • an InputStream
  • an XFile
Other types are processed as a file, that may be resolved by the given URI resolver.
uriResolver - The URI resolver that resolves a file.
Returns:
The XML source.
Throws:
FileSystemException - When the source should be a file but can't be accessed.
TransformerException