'Tag.parent' should be a read-only property.
Add 'Attribute.parent'.
Make Attribute's 'name' and 'namespace' properties so (eventually) changing them can properly update the parent tag.