When I access a document through the Lists.GetListItems web service, I get meta data in the ows_* attributes. These, however are encoded in a strange way ("[RowID];#[data]"). I'm fairly confident I can parse these reliably, but is there a less opaque way to extract document meta data? Is this encoding format documented somewhere?


When using the WebServices SharePoint gives you the "full" value of Lookup fields as it don't know if you just want the text or also the relation.

The format is described in the remarks to SPFieldLookupValueCollection.ToString Method as

The string that is returned includes a series of substrings, each of which represents one value for a multiple value lookup. The substring for a single value has the following format:

In this format, Id is the identifier for the list item that the lookup field points to and Value is the value of the field that the lookup field points to. The two parts are delimited by the characters ";#". If Value contains a semicolon (";"), it is escaped with a semicolon (";;").

The same delimiter (";#") is used when multiple values are joined in a single string such as the one returned by the ToString method. For example, the following string represents the value of a multiple value lookup with two values:
3;#a field value;#7;#another field value

The only thing to look out for is the ;; being an escaped ; in the text

|improve this answer|||||
  • Thanks. I can add that I found <ViewFields Properties="True" /> to be very helpful in this regard. – mseebach Jul 30 '12 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.