Refactor [xml]: changed the way of using simplexml to work with text nodes