diff --git a/restws.formats.inc b/restws.formats.inc
index 3a9a958..c9b3736 100644
--- a/restws.formats.inc
+++ b/restws.formats.inc
@@ -533,8 +533,8 @@ class RestWSFormatXML extends RestWSBaseFormat {
    */
   public function xmlToArray($properties, SimpleXMLElement $xml, $listItemType = NULL) {
     foreach ($xml->children() as $name => $element) {
-      // Check if isset type or we are processing a list.
-      if (isset($properties[$name]['type']) || isset($listItemType)) {
+      // Check if we are processing a list or a reference to another entity.
+      if ((isset($properties[$name]['type']) && entity_property_list_extract_type($properties[$name]['type'])) || isset($listItemType)) {
         // If we are processing a list, then set the type of the list and save
         // the results into a a numeric array.
         if (isset($listItemType)) {
