Ejemplo n.º 1
0
 protected override IDanmakus Parse()
 {
     try
     {
         if (MDataSource != null)
         {
             AndroidFileSource source         = (AndroidFileSource)MDataSource;
             IXMLReader        xmlReader      = XMLReaderFactory.CreateXMLReader();
             XmlContentHandler contentHandler = new XmlContentHandler(this);
             xmlReader.ContentHandler = contentHandler;
             var inputSource = new InputSource(source.DataStream);
             xmlReader.Parse(inputSource);
             return(contentHandler.Result);
         }
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message);
     }
     return(new Danmakus());
 }