final ElementList<?> list = element.property( (ListProperty) property );
final List<XmlNode> xmlNodes = new ArrayList<XmlNode>( list.size() );
for( Element entry : list )
{
final Resource resource = entry.resource();
if( resource instanceof XmlResource )
{
final XmlNode xmlNode = ( (XmlResource) resource ).getXmlElement();
if( xmlNode != null )
{
xmlNodes.add( xmlNode );
}
}
}
return xmlNodes;
}
else if( property instanceof ElementProperty && ! ( property instanceof ImpliedElementProperty ) )
{
final Element child = element.property( (ElementProperty) property ).content();
if( child != null )
{
final Resource resource = child.resource();
if( resource instanceof XmlResource )
{
final XmlNode xmlNode = ( (XmlResource) resource ).getXmlElement();
if( xmlNode != null )
{
return Collections.singletonList( xmlNode );
}
}
}
}
else
{
final Resource resource = element.resource();
if( resource instanceof XmlResource )
{
final XmlResource r = (XmlResource) resource;
final XmlNode xmlNode = ( (XmlValueBindingImpl) r.binding( element.property( property ) ) ).getXmlNode();