I have various XML schemas with lots of global elements that look like this:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="B">
...
</xs:element>
<xs:element name="C">
...
</xs:element>
<xs:element name="X">
...
</xs:element>
<xs:element name="F">
...
</xs:element>
<xs:element name="A">
...
</xs:element>
</xs:schema>
Is there a free tool that can sort the elements alphabetically based on their names? This way it would be easier to compare and merge schemas. The result should look like this:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="A">
...
</xs:element>
<xs:element name="B">
...
</xs:element>
<xs:element name="C">
...
</xs:element>
<xs:element name="F">
...
</xs:element>
<xs:element name="X">
...
</xs:element>
</xs:schema>