/** * If you want to write the java bean out in a different way from * the standard XML writer, use this method. */ public static void writeBeanProperty(Object obj, BeanWriter out, String propertyName) throws IOException, java.beans.IntrospectionException { writeBeanProperty(obj, out, new HashMap(), propertyName); }
/** * This is the normal top level method for taking a Java Bean and * dumping it as XML. * @param obj the java bean to write out * @param out the place to write it to * @param propertyName the top level property */ public static void writeBeanProperty(Object obj, Writer out, String propertyName) throws IOException, java.beans.IntrospectionException { BeanWriter beanOut = new XmlBeanWriter(out); writeBeanProperty(obj, beanOut, propertyName); }
while (it.hasNext()) { Object childElement = it.next(); writeBeanProperty(childElement, out, skipChildren, propertyName); for (int j = 0; j < size; ++j) { Object childElement = Array.get(childObj, j); writeBeanProperty(childElement, out, skipChildren, propertyName); writeBeanProperty(childObj, out, skipChildren, propertyName);