Enterprise Software Solutions – On Premise, In the Cloud or Managed

Parsing Managed Metadata values in Sharepoint Library

Managed Metadata is a powerful concept introduced in Sharepoint 2010. It allows you to build taxonomic hierarchies and set them as attributes for your Library metadata fields. Retrieving Managed Metadata value fields from a Sharepoint Library in your .Net project can be a bit tricky.

Below is a step by step on successfully retrieved managed metadata field values from a Sharepoint Library:

GetSharePointMetadata - uses Sharepoint Lists web service method GetListItems to retrieve the raw value for your Sharepoint Library managed metadata column. You will need to pass in the itemID of the Sharepoint Library to this method.

ParseMultiValueSelectManagedMetdata – parses the raw value retrieved from Sharepoint and massages it to get the metadata

Helper Methods:

GetFullDataTable – retrieves Sharepoint Document Metadata into a dataset

ConvertZRowToRegularXml – Transforms XML from Sharepoint into XML understandable by Datatable

Include file to transform the xml