I have the following xml file:
If I were you, I would use an interface with your desired methods (getProperty, Resource, etc) and provide an XPath implementation.
getProperty
Resource