Used minidom to try and be more forgiving when parsing sld. I hope this doesn't break anything and is usefull.