Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void ReadXml(XmlReader reader)
- {
- reader.MoveToContent();
- if (reader.ReadToDescendant("TaggingProfileEntry"))
- {
- while (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName.Equals("TaggingProfileEntry"))
- {
- string termSetName = reader.GetAttribute("TermSetName");
- string taxonomyFieldValueCollectionString = reader.GetAttribute("ValueCollectionString");
- if (!string.IsNullOrEmpty(termSetName) && !string.IsNullOrEmpty(taxonomyFieldValueCollectionString))
- {
- TaxonomyFieldValueCollection taxonomyFieldValueCollection = new TaxonomyFieldValueCollection(string.Empty);
- taxonomyFieldValueCollection.PopulateFromLabelGuidPairs(taxonomyFieldValueCollectionString);
- // Populate values with Wss Id's
- foreach (TaxonomyFieldValue taxonomyFieldValue in taxonomyFieldValueCollection)
- {
- taxonomyFieldValue.PopulateWssId(TERM_STORE_GROUP_NAME, termSetName);
- }
- this[termSetName] = taxonomyFieldValueCollection;
- }
- reader.Read();
- }
- }
- }
Add Comment
Please, Sign In to add comment