add XMLFactory

still need more unit tests
still need save feature