[Devel] reimplementing using visitor pattern

Changing to the visitor pattern will make it easier to implement a SAX
reader and writer

This is a commit so that i don't loose my work. The code currently does
not compile