(self, element, tag, cardinality)
| 101 | Child element definition |
| 102 | """ |
| 103 | def __init__(self, element, tag, cardinality): |
| 104 | self.element = element |
| 105 | self.tag = tag |
| 106 | self.cardinality = cardinality |
| 107 | if not ':' in tag: |
| 108 | tmpl = "missing namespace prefix in tag: '%s'" |
| 109 | raise ValueError(tmpl % tag) |
| 110 | tagparts = tag.split(':') |
| 111 | self.nsprefix = tagparts[0] |
| 112 | self.tagname = tagparts[1] |
| 113 | |
| 114 | def __getitem__(self, key): |
| 115 | return self.__getattribute__(key) |