org.objectweb.telosys.util
Class XmlUtil

java.lang.Object
  extended byorg.objectweb.telosys.util.XmlUtil

public final class XmlUtil
extends java.lang.Object

Utility class for XML operations ( set of static methods )


Method Summary
static org.w3c.dom.Document loadFile(java.lang.String sFileName)
          Deprecated.  
static org.w3c.dom.Document parse(java.io.File file)
          Parse the given File object
static org.w3c.dom.Document parse(java.io.InputStream is)
          Parse the given InputStream
static org.w3c.dom.Document parse(java.lang.String sFileName)
          Parse the given File name
static java.lang.String xmlBool(boolean b)
          Returns the given boolean as a Telosys XML boolean value
static java.lang.String xmlDate(java.util.Date date)
          Returns the given date as a Telosys XML date value ( in ISO format )
static java.lang.String xmlString(java.lang.String sStdString)
          Converts a "Standard String" to an "Xml String"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

xmlString

public static java.lang.String xmlString(java.lang.String sStdString)
Converts a "Standard String" to an "Xml String"

Parameters:
sStdString - :
Returns:
String :

xmlDate

public static java.lang.String xmlDate(java.util.Date date)
Returns the given date as a Telosys XML date value ( in ISO format )

Parameters:
date -
Returns:
the ISO date or "" if the given date is null

xmlBool

public static java.lang.String xmlBool(boolean b)
Returns the given boolean as a Telosys XML boolean value

Parameters:
b -
Returns:
"1" for TRUE, "0" for FALSE

loadFile

public static org.w3c.dom.Document loadFile(java.lang.String sFileName)
Deprecated.  

Loads an XML file as a "DOM document" with the default JAXP DOM Parser

Parameters:
sFileName - : the XML file to load
Returns:
: reference on the document loaded (or null if an error occurs)

parse

public static org.w3c.dom.Document parse(java.lang.String sFileName)
                                  throws TelosysException
Parse the given File name

Parameters:
sFileName -
Returns:
DOM document object
Throws:
TelosysException

parse

public static org.w3c.dom.Document parse(java.io.File file)
                                  throws TelosysException
Parse the given File object

Parameters:
file -
Returns:
DOM document object
Throws:
TelosysException

parse

public static org.w3c.dom.Document parse(java.io.InputStream is)
                                  throws TelosysException
Parse the given InputStream

Parameters:
is -
Returns:
DOM document object
Throws:
TelosysException