com.flexive.shared
Class FxXMLUtils

java.lang.Object
  extended by com.flexive.shared.FxXMLUtils

public class FxXMLUtils
extends java.lang.Object

XML Utilities

Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Field Summary
static java.lang.String XML_HEADER
          XML header to use
 
Constructor Summary
FxXMLUtils()
           
 
Method Summary
static java.lang.String getElementData(java.lang.String xml, java.lang.String element)
          Get the character content of an element in xml data
static java.lang.String toXML(com.thoughtworks.xstream.XStream xStream, java.lang.Object object)
          Convenience method to create a more compact XML representation of an object than XStream.toXML(Object) creates (no pretty-printing).
static void writeSimpleTag(javax.xml.stream.XMLStreamWriter writer, java.lang.String tag, java.lang.Object value, boolean asCData)
          Write a "simple" tag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_HEADER

public static final java.lang.String XML_HEADER
XML header to use

See Also:
Constant Field Values
Constructor Detail

FxXMLUtils

public FxXMLUtils()
Method Detail

getElementData

public static java.lang.String getElementData(java.lang.String xml,
                                              java.lang.String element)
Get the character content of an element in xml data

Parameters:
xml - the complete xml data
element - requested element
Returns:
data

toXML

public static java.lang.String toXML(com.thoughtworks.xstream.XStream xStream,
                                     java.lang.Object object)
Convenience method to create a more compact XML representation of an object than XStream.toXML(Object) creates (no pretty-printing).

Parameters:
xStream - the xstream instance
object - the object to be marshalled
Returns:
the XML representation of the object

writeSimpleTag

public static void writeSimpleTag(javax.xml.stream.XMLStreamWriter writer,
                                  java.lang.String tag,
                                  java.lang.Object value,
                                  boolean asCData)
                           throws javax.xml.stream.XMLStreamException
Write a "simple" tag

Parameters:
writer - xml writer
tag - tag name
value - value
asCData - use CDData?
Throws:
javax.xml.stream.XMLStreamException - on errors