add support for getting xml element + encoding tests