I have Location category and under this category: region->countries->cities.I want to get the hierarchical category data in XML in TOM.NET by passing parent's categoryID. I just want basic info e.g. tcmId , Title
I am trying below code :
TaxonomiesOwlFilter filter = new TaxonomiesOwlFilter(Engine.GetSession());
filter.RootCategories = new Category[] { new Category(Engine.GetSession(),
new TcmUri("tcm:xx-xxxx-xxx")) };
Repository rep = this.Publication as Repository;
Package.AddXml("Keywordxml", rep.GetTaxonomiesOwl(filter).ToString());
But while executing the code, I am getting the below error:
"Invalid type:Category."
I really don't know how to do that, just trying solution found on sites. Please let me know.