Add Entity interface

This patch adds an Entity class that can be used to query entity nodes
found in the xml tree and tests for those accessors.