Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public static string StringifyExtractedText(ExtractedText extractedText)
 {
     return(JsonConvert.SerializeObject(extractedText));
 }