Added XMLFactory and it's unit tests