public XMLNode toNode(MetaRelations object) throws Exception { XMLNode node = new XMLNode("meta-relations"); Attributes attrs = new Attributes(node); Object2XML mapper = Object2XML.getInstance(); mapper.addNode(object.getMetaId(), node, false, "id"); mapper.addNode( object.getMetaRelations(), node, false, "items", "item", "org.vietspider.bean.MetaRelation"); return node; }