Esempio n. 1
0
        private static void CreateTaxonomyElement(XmlNode node)
        {
            switch (node.Name)
            {
            case "taxonomyGroup":
                TaxonomyGroup = new TaxonomyGroup();
                break;

            case "taxonomyTermsets":
                break;

            case "taxonomyTermset":
                TermsetInfo = new TermSetInfo();
                break;

            case "terms":
                if (TermInfos == null)
                {
                    TermInfos = new List <TermInfo>();
                }
                break;

            case "term":
                var termInfo = new TermInfo();
                termInfo.TermId = Guid.NewGuid();
                TermInfos.Add(termInfo);
                break;

            case "name":
                NameParent(node.ParentNode.Name, node.InnerXml);
                break;

            case "format":
                var lastTerm = TermInfos.Last();
                lastTerm.TermFormat = node.InnerXml;
                break;

            case "url":
                var term = TermInfos.Last();
                term.TermHref = node.InnerXml;
                break;

            case "order":
                var finalTerm = TermInfos.Last();
                finalTerm.TermOrder = Convert.ToInt32(Int32.Parse(node.InnerXml));
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
 public TaxonomyGroup()
 {
     TermSet = new TermSetInfo();
 }