Skip to content

How to create a class to describe the XML attribute of an element ? #27

@HyperFly

Description

@HyperFly

Example XML:

<BuildingList CID=”LTP01831”>
	<Building>
		<BAID>01</BAID>
		<BAName>BuildingA</BAName>
		<UpdNo>13</UpdNo>
	</Building>
	….
</BuildingList>

Corresponding Classes:

class Building(complextypes.ComplexType):
	BAID = str
	BAName = str
	UpdNo = str
	
class BuildingList(complextypes.ComplexType):
	list = [Building]

How to describe attribute "CID" in element "BuildingList" ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions