Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Xml Structure
- <?xml version="1.0" encoding="utf-8"?>
- <News>
- <Link>
- <Summary>...</Summary>
- </Link>
- </News>
- //load xml
- var result = XDocument.Load(mypathlocal);
- //group and count words
- //stringlist is combined xml node values.
- var PopWords1 = PopWords1_stringlist.GroupBy(x => x)
- .Select(x => new { x.Key, Count = x.Count() })
- .OrderByDescending(x => x.Count).ToList();
- //try to get count of Link every PopWord
- //for example: "Trump" word contains 5 Link at least one times
- foreach(var value in PopWords1)
- {
- }
Add Comment
Please, Sign In to add comment