Hi,
Regarding how to read all term set you can try the following code.
E.g.
static void TermSetDemo(SPSite site) { TaxonomySession session = new TaxonomySession(site); // Get all the TermStores associated with the provided site. TermStoreCollection termStores = session.TermStores; foreach (Group item in termStores[0].Groups) { Console.WriteLine(item.Name+":"+item.Id.ToString()); } Console.WriteLine(termStores.Count); //get wiki site group guid //72174740-c695-4412-a87f-279cbf7f88cb Group wikiGroup = termStores[0].GetGroup(new Guid("72174740-c695-4412-a87f-279cbf7f88cb"));//wikiGroup.TermSets[0].Terms[0] foreach (TermSet set in wikiGroup.TermSets) { foreach (Term item in set.Terms) { Console.WriteLine(item.Name); Console.WriteLine("--------"); } } }
For more information about the termset you can see the following document.
Http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.taxonomy.taxonomysession.aspx