Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. public List<string> createTagTree()
  2. {
  3.  
  4. string text = OpenFileAndExtract(this.fileName);
  5.  
  6. List<string> tagList = new List<string>();
  7. string node = "";
  8.  
  9.  
  10. for (int index = 0; index < text.Length; index++)
  11. {
  12. if (text[index].Equals('<'))
  13. {
  14. for (int index2 = index + 1; index2 < text.Length; index2++)
  15. {
  16. if (!text[index2].Equals(' ') && !text[index2].Equals('>'))
  17. {
  18. node = node + text[index2];
  19.  
  20. }
  21. if (text[index2].Equals('>') || text[index2].Equals(' '))
  22. {
  23. break;
  24. }
  25. }
  26. node = Regex.Replace(node, @"\t|\n|\r|", "");
  27. tagList.Add(node);
  28. node = "";
  29. }
  30.  
  31.  
  32. }
  33.  
  34. return tagList;
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement