public static ExtractedText LanguageObject(IElement element) { var contentOfAnchor = element.Children.First(item => item.LocalName == "a"); var contentOfStrong = contentOfAnchor.Children.First(item => item.LocalName == "strong").TextContent; var contentOfSmall = contentOfAnchor.Children.First(item => item.LocalName == "small").TextContent; var result = new ExtractedText(); result.Language = contentOfStrong; result.Info = contentOfSmall; return(result); }
public static ExtractedText LanguageObject(IElement element) { var contentFromAnchor = element.Children.First(item => item.LocalName == "a"); var contentFromStrong = contentFromAnchor.Children.First(item => item.LocalName == "strong").TextContent; var contentFromSmall = contentFromAnchor.Children.First(item => item.LocalName == "small").TextContent; var langObject = new ExtractedText(); langObject.Language = contentFromStrong; langObject.Details = contentFromSmall; return(langObject); }
public static string StringifyExtractedText(ExtractedText extractedText) { return(JsonConvert.SerializeObject(extractedText)); }