|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwox.serial.XMLUtil
public class XMLUtil
The XMLUtil class provides static methods that are used by
SimpleReader and SimpleWriter. The methods of
this class are used by the serialization and de-serialization processes.
| Field Summary |
|---|
| Fields inherited from interface wox.serial.Serial |
|---|
ARRAY, ARRAYLIST, DECLARED, ELEMENT_TYPE, ENTRY, FIELD, ID, IDREF, KEY, KEY_TYPE, LENGTH, MAP, NAME, OBJECT, primitiveArrays, primitiveArraysWOX, primitives, primitiveWrappers, TYPE, VALUE, VALUE_TYPE |
| Constructor Summary | |
|---|---|
XMLUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
convertXmlToString(java.lang.String xmlFileName)
This method reads an XML file and returns its contents as String. |
static boolean |
createFile(org.jdom.Element element,
java.io.File filename)
This method creates an XML file, and puts the JDOM Element as its contents. |
static void |
disElement(org.jdom.Element element)
This method displays the XML representation of the JDOM Element (object) passed as parameter. |
static void |
disElement(java.lang.Object object)
This method displays the XML representation of the object passed as parameter. |
static java.lang.String |
element2BrowserString(org.jdom.Element element)
This method takes a JDOM Element and returns its string representation in XML ready to be presented in a browser The method replaces the characters '<' and '>' by '<' and '>' respectively. |
static java.lang.String |
element2String(org.jdom.Element element)
This method takes a JDOM Element object and returns its string representation. |
static java.lang.String |
generateRandomNo()
It generates a random number and returns it as string. |
static java.lang.String |
getXmlElementAsString(org.jdom.Element xmlElement)
This method converts a JDOM Element to a String in XML. |
static org.jdom.Element |
xmlToElement(java.lang.String xmlPath)
This method converts an XML file into a JDOM Element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLUtil()
| Method Detail |
|---|
public static void disElement(java.lang.Object object)
throws java.lang.Exception
object - The object to be displayed.
java.lang.Exception - If there is a problem displaying the object.
public static void disElement(org.jdom.Element element)
throws java.lang.Exception
element - The JDOM element (object) to be displayed
java.lang.Exception - If there is a problem displaying the object.
public static java.lang.String element2String(org.jdom.Element element)
throws java.lang.Exception
element - The JDOM object.
java.lang.Exception - If there is a problem.
Author: Carlos Roberto Jaimez Gonzalez 3rd May 2005
public static java.lang.String element2BrowserString(org.jdom.Element element)
throws java.lang.Exception
element - The JDOM Element to be displayed.
java.lang.Exception - If there is a problem.
public static org.jdom.Element xmlToElement(java.lang.String xmlPath)
throws java.lang.Exception
xmlPath - The path of the XML file to be converted.
java.lang.Exception - If there is a problem.
public static boolean createFile(org.jdom.Element element,
java.io.File filename)
element - The JDOM Element to be stored.filename - The file to be created.
public static java.lang.String generateRandomNo()
public static java.lang.String convertXmlToString(java.lang.String xmlFileName)
throws java.lang.Exception
xmlFileName - The name (path) of the XML file.
java.lang.Exception - If there is a problem.public static java.lang.String getXmlElementAsString(org.jdom.Element xmlElement)
xmlElement - The JDOM Element to be converted.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||