How to set the publication conditions through API

Hi,

How can we set the conditions to the publication through API  PublicationOutput 2.5 SetMetadata. My metadata is as below to add the features for the FISHPUBCONTEXT in ishfields. Could not add the child elements under the ishfield.

var myMetadata = "<ishfields><ishfield name = 'FISHPUBCONTEXT' level='version'>" +

                     "<features>< feature name ='legacy' value='filter3' /></ features >" +

                 "</ishfield></ishfields>";

The error recieved is 

[-105002] The XML of xmlMetadata did not pass schema ISHGeneralFields validation. The element 'ishfield' cannot contain child element 'features'
because the parent element's content model is text only. [105002;SchemaValidationFailure]
Parents Reply Children
No Data