com.wutka.jox
Class JOXBeanBuilder

java.lang.Object
  |
  +--com.wutka.jox.JOXBeanBuilder

public class JOXBeanBuilder
extends java.lang.Object

JOXBeanBuilder builds a bean from an XML Element subtree.


Constructor Summary
JOXBeanBuilder(org.w3c.dom.Element el)
          Creates a new JOXBeanBuilder around a DOM Element.
 
Method Summary
 java.lang.Object readObject(java.lang.Class obClass)
          Reads an XML document into a new instance of the given class, matching tag names to bean property names.
 void readObject(java.lang.Object ob)
          Reads an XML document into the object, matching tag names to bean property names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JOXBeanBuilder

public JOXBeanBuilder(org.w3c.dom.Element el)
Creates a new JOXBeanBuilder around a DOM Element.
Parameters:
el - The DOM Element to use for the bean
Method Detail

readObject

public void readObject(java.lang.Object ob)
                throws java.io.IOException
Reads an XML document into the object, matching tag names to bean property names.
Parameters:
ob - The object that will receive data from the XML document
Throws:
java.io.IOException - If there is an error reading the document

readObject

public java.lang.Object readObject(java.lang.Class obClass)
                            throws java.io.IOException
Reads an XML document into a new instance of the given class, matching tag names to bean property names.
Parameters:
obClass - The class for the object that will receive data from the XML document
Returns:
The new instance of the class containing the parsed data
Throws:
java.io.IOException - If there is an error reading the document