public class XmlBindingTools extends Object
Constructor and Description |
---|
XmlBindingTools() |
Modifier and Type | Method and Description |
---|---|
static void |
generateXML(Object rootElement,
Writer writer)
Generate XML using the supplied root element as the
root of the object tree and write the resulting XML to
the specified writer
|
static <E> E |
parseXML(Reader reader,
Class<E> rootElementClass)
Parse the XML supplied by the reader into the
corresponding tree of Java objects.
|
public XmlBindingTools()
public static <E> E parseXML(Reader reader, Class<E> rootElementClass) throws JAXBException
reader
- Cannot be null. The source of the XML.rootElementClass
- Cannot be null. The type of the
root element.JAXBException
- if an error occurs parsing the
XML.public static void generateXML(Object rootElement, Writer writer) throws JAXBException
rootElement
- Cannot be null.writer
- Cannot be null.JAXBException
Java Examples available from http://www.basilv.com/psd/software Copyright © 2009 by Basil Vandegriend. All Rights Reserved.