def is_valid_name(name: str) -> bool:
    """Test whether a string is a valid element or attribute name."""

def is_valid_text(data: str) -> bool:
    """Test whether a string is a sequence of legal XML 1.0 characters."""
