Changing the serialisation of xml doc and fix the SVG api