XML Export / Import Progress:

* Exporter finished
* Imported started. Currently reading in nodes and printing them.
* Add XSD file for automatic validation. Working.

TODO:
* Correcly handle main logic of import export
* Finish importer
This commit is contained in:
2023-01-03 23:08:29 +01:00
parent 681a66e127
commit ea81d0a8fd
7 changed files with 269 additions and 6 deletions

38
resources/schema.xsd Normal file
View File

@@ -0,0 +1,38 @@
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="patchelfcrc">
<xs:complexType>
<xs:sequence>
<xs:element name="settings">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="poly"/>
<xs:element type="xs:string" name="start"/>
<xs:element type="xs:string" name="rev"/>
<xs:element type="xs:string" name="xor"/>
<xs:element type="xs:integer" name="elfclass"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="sections">
<xs:complexType>
<xs:sequence>
<xs:element name="crc">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name"/>
<xs:attribute type="xs:integer" name="index"/>
<xs:attribute type="xs:string" name="vma"/>
<xs:attribute type="xs:string" name="size"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="version"/>
</xs:complexType>
</xs:element>
</xs:schema>