Added code to retrieve the node types for the xml object and associate the correct node type with the resulting data node object