initial version of simplexml refactor