Create an object based on the root tag name. @param root: An XML root element. @type root: L{Element} @param schema: A schema object. @type schema: L{schema.Schema} @return: The created object. @rtype: L{SchemaObject}
(cls, root, schema)
| 742 | |
| 743 | @classmethod |
| 744 | def create(cls, root, schema): |
| 745 | """ |
| 746 | Create an object based on the root tag name. |
| 747 | @param root: An XML root element. |
| 748 | @type root: L{Element} |
| 749 | @param schema: A schema object. |
| 750 | @type schema: L{schema.Schema} |
| 751 | @return: The created object. |
| 752 | @rtype: L{SchemaObject} |
| 753 | """ |
| 754 | fn = cls.tags.get(root.name) |
| 755 | if fn is not None: |
| 756 | return fn(schema, root) |
| 757 | else: |
| 758 | return None |
| 759 | |
| 760 | @classmethod |
| 761 | def build(cls, root, schema, filter=('*',)): |