refactor svg parsing so that libxml is not needed in the hpp file