Trying to export an ontology created by Protoge, edited using owlready2 and exported.
When I have a class with brackets in the name i.e. Class_with(Brackets), and then instantiate it and then export it produces the following XML:
Now that bracket invalidated the XML. Protoge solves it by exporting it like this: