public static List <Raw_AniDB_Tag> ProcessTags(XmlDocument docAnime, int animeID) { List <Raw_AniDB_Tag> tags = new List <Raw_AniDB_Tag>(); XmlNodeList tagItems = docAnime?["anime"]?["tags"]?.GetElementsByTagName("tag"); if (tagItems == null) { return(tags); } foreach (XmlNode node in tagItems) { try { Raw_AniDB_Tag tag = new Raw_AniDB_Tag(); tag.ProcessFromHTTPResult(node, animeID); tags.Add(tag); } catch (Exception ex) { logger.Error(ex, $"Error in AniDBHTTPHelper.ProcessTags: {ex}"); } } return(tags); }
public static List <Raw_AniDB_Tag> ProcessTags(XmlDocument docAnime, int animeID) { List <Raw_AniDB_Tag> tags = new List <Raw_AniDB_Tag>(); try { if (docAnime["anime"]["tags"] != null) { XmlNodeList tagItems = docAnime["anime"]["tags"].GetElementsByTagName("tag"); if (tagItems != null) { foreach (XmlNode node in tagItems) { try { Raw_AniDB_Tag tag = new Raw_AniDB_Tag(); tag.ProcessFromHTTPResult(node, animeID); tags.Add(tag); } catch (Exception ex) { //BaseConfig.MyAnimeLog.Write("Error in GetEpisodes: {0}", ex); } } } } } catch (Exception ex) { logger.ErrorException("Error in AniDBHTTPHelper.ProcessTags: {0}", ex); return(null); } return(tags); }
public static List<Raw_AniDB_Tag> ProcessTags(XmlDocument docAnime, int animeID) { List<Raw_AniDB_Tag> tags = new List<Raw_AniDB_Tag>(); try { if (docAnime["anime"]["tags"] != null) { XmlNodeList tagItems = docAnime["anime"]["tags"].GetElementsByTagName("tag"); if (tagItems != null) { foreach (XmlNode node in tagItems) { try { Raw_AniDB_Tag tag = new Raw_AniDB_Tag(); tag.ProcessFromHTTPResult(node, animeID); tags.Add(tag); } catch (Exception ex) { //BaseConfig.MyAnimeLog.Write("Error in GetEpisodes: {0}", ex); } } } } } catch (Exception ex) { logger.ErrorException("Error in AniDBHTTPHelper.ProcessTags: {0}", ex); return null; } return tags; }