Jeremy Grand-Scrutton
Jeremy Grand-Scrutton

Reputation: 2802

In SDL Tridion 2011, how can I process metadata on an item using the Core Service?

I'm using the Core Service to read Keyword information in SDL Tridion 2011. How can I process any metadata on the items I'm reading? I can see a Metadata property that contains a string of XML, and a MetadataSchema property that represents a link to a Schema. Should I deal directly with the XML, or is there a way to do something more like the ItemFields processing in the TOM.Net?

What if I want to add metadata to an item that doesn't already have any set?

Upvotes: 4

Views: 1159

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598668

You'll need to provide your own code to parse and modify that XML, based on the associated Schema. I wrote a small Fields class to do the heavy lifting, which you can find here: https://code.google.com/p/tridion-practice/wiki/ChangeContentOrMetadata

Upvotes: 8

Related Questions