Beispiel #1
0
        internal static MusicCatalog CreateFromXml(XDocument dataDoc)
        {
            if (dataDoc == null)
            {
                return(null);
            }
            MusicCatalogXmlParser parser = new MusicCatalogXmlParser(dataDoc);

            return(parser._musicCatalog);
        }
Beispiel #2
0
        public static MusicCatalog CreateFromXml(string filepath)
        {
            XDocument doc;

            try
            {
                doc = XDocument.Load(filepath);
            }
            catch (Exception)
            {
                return(null);
            }

            return(MusicCatalogXmlParser.CreateFromXml(doc));
        }