XML : Make Python class from xml file

I need generate a Python class from an XML file like this:

    <Enum type="Sometype">      <Value category="?">reload</Value>      <Value category="?"></Value>    </Enum>    <Enum type="Sometype2">       <Value category="-" color="steelblue" image="ico/Sometype2.png" model="Sometype2/Sometype2.ive">error.defective</Value>      <Value category="?" color="lightgrey" image="ico/Sometype2.png" model="Sometype2/Sometype2.ive">none.unknown</Value>      <Value category="+" color="forestgreen" image="ico/Sometype2.png" model="Sometype2/Sometype2.ive">ok.normal</Value>      <Value category="?" color="grey" image="ico/Sometype2.png" model="Sometype2/Sometype2.ive"></Value>    </Enum>    

But it's not all after generating the class I need to put inside some data from a JSON file:

    "000000000000000000000000000000000000000": {      "type": "Sometype2",      "types": [        "Item",        "Sometype2",        "Object",        "MoveableObject",        "BaseObject",        "MoveableCategory",        "Category"      ],    

No comments:

Post a Comment