Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

tridion

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?

like image 443
Jeremy Grand-Scrutton Avatar asked Feb 21 '23 09:02

Jeremy Grand-Scrutton


1 Answers

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

like image 195
Frank van Puffelen Avatar answered Apr 27 '23 13:04

Frank van Puffelen