internal static MusicCatalog CreateFromXml(XDocument dataDoc) { if (dataDoc == null) { return(null); } MusicCatalogXmlParser parser = new MusicCatalogXmlParser(dataDoc); return(parser._musicCatalog); }
public static MusicCatalog CreateFromXml(string filepath) { XDocument doc; try { doc = XDocument.Load(filepath); } catch (Exception) { return(null); } return(MusicCatalogXmlParser.CreateFromXml(doc)); }