<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_valid(xml_string):
 """validates a unicode string containing xml"""

    xml_file = StringIO.StringIO(xml_string.encode('utf-8'))
    
    parser = XmlScanner()
    parser.setContentHandler(ContentHandler())
    try:
        parser.parse(xml_file)
    except SAXParseException:
        return False
    
    return True