Guest User

Untitled

a guest
Jun 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. //Xml Structure
  2. <?xml version="1.0" encoding="utf-8"?>
  3. <News>
  4. <Link>
  5. <Summary>...</Summary>
  6. </Link>
  7. </News>
  8.  
  9. //load xml
  10. var result = XDocument.Load(mypathlocal);
  11.  
  12. //group and count words
  13. //stringlist is combined xml node values.
  14. var PopWords1 = PopWords1_stringlist.GroupBy(x => x)
  15. .Select(x => new { x.Key, Count = x.Count() })
  16. .OrderByDescending(x => x.Count).ToList();
  17.  
  18. //try to get count of Link every PopWord
  19. //for example: "Trump" word contains 5 Link at least one times
  20. foreach(var value in PopWords1)
  21. {
  22.  
  23. }
Add Comment
Please, Sign In to add comment