org.nhindirect.xd.transform.util
Class XmlUtils

java.lang.Object
  extended by org.nhindirect.xd.transform.util.XmlUtils

public class XmlUtils
extends Object

This class contains common XML utility methods.

Author:
beau

Constructor Summary
XmlUtils()
           
 
Method Summary
static String marshal(QName altName, Object jaxb, Class<?> factory)
          Marshal an object into an XML string.
static Object unmarshal(String xml, Class<?> factory)
          Unmarshal an string into an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlUtils

public XmlUtils()
Method Detail

marshal

public static String marshal(QName altName,
                             Object jaxb,
                             Class<?> factory)
Marshal an object into an XML string.

Parameters:
altName - The altName.
jaxb - The object to marshal.
factory - The factory class.
Returns:
a marshaled string from the object.

unmarshal

public static Object unmarshal(String xml,
                               Class<?> factory)
                        throws JAXBException
Unmarshal an string into an object.

Parameters:
xml - The XML string.
factory - The factory class.
Returns:
an object representation of the string.
Throws:
JAXBException


Copyright © 2010-2011. All Rights Reserved.