{
HierarchicalModel<Element> model = null;
if (value instanceof Iterable)
{
String name = getClassName( ( ( Iterable<?> ) value ).iterator().next() );
model = new XmlHierarchyModelImpl( new DOMElement( "result" ), name );
}
else
{
model = new XmlHierarchyModelImpl( new DOMElement( getClassName( value ) ) );
}
_resultTraverser.traverse( value, context.getSelector(), model, context );
XmlYogaViewUtil.write( model.getUnderlyingModel(), os );
}