Add a child object to the current one.

        Checks the contained_children list to make sure that the object
        is allowable, and throws an exception if not.

def add_child(self, child):
        """Add a child object to the current one.

        Checks the contained_children list to make sure that the object
        is allowable, and throws an exception if not.
        """
        # Make sure the child exists before adding it.
        if child:
            # Add the child if it is allowed to exist under the parent.
            if child.tag in self.contained_children:
                self.children.append(child)
            else:
                raise ETD_MS_StructureException(
                    'Invalid child "%s" for parent "%s"' %
                    (child.tag, self.tag)
                )