Update metadata and fields using XML


About

This article explains how to create and structure an XML file for bulk updating entries using Kaltura’s MRSS-based XML format. It includes annotated examples and key rules to ensure successful ingestion.

You can use XML files to:

  • Update existing entries in bulk
  • Modify metadata, categories, and other fields
  • Work with custom metadata profiles

To learn more about XML ingestion, see Learn about CSV and XML files for bulk upload.

Example XML file with comments

<?xml version="1.0"?> 

<!--the row above and this part below should not change--> 

<mrss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ingestion.xsd"> 
<channel> 
<item> 
<action>update</action> 

<!--here you determine the entry ID you want to update--> 

<entryId>0_bukomjmo</entryId> 

<!--name and description are textual values with little to none limitations (maybe just the length)--> 

<name>TEST</name> 
<description>TEST</description> 

<!--only in the category part, write the categories by their accurate names. to show categories hierarchy, start with the highest one and put the > sign between them with no spaces. you can add or remove as much <category>XXX</category> fields as you wish. If the categories do not exist, like in the second example, they will be created--> 

<categories> 
<category>Events>2014</category> 
<category>Events>TEST</category> 
</categories> 

<!--these fields below should also not change, unless you want to set a different custom metadataProfileId--> 

<customDataItems> 
<customData metadataProfileId="906921"> 
<xmlData> 
<metadata> 



<!-- these are textual fields, but note that in your metadata profile the 'event' and 'page' values are limited to one character--> 

<Event>1</Event> 
<Page>1</Page> 

<!-- 'rider' and 'horse' are unlimited textual files--> 

<Rider>TEST</Rider> 
<Horse>TEST</Horse> 

<!--'Disciplines' is a field the is chosen from a list of values, meaning that if you will not choose a value from the list the file will fail completely--> 

<Disciplines>Arabian</Disciplines> 

<!--this part below should also not change--> 
</metadata> 
</xmlData> 
</customData> 
</customDataItems> 
</item> 
</channel> 
</mrss> 

Example XML file without the "event " field

The following is an example of an XML file without the 'Event' field. The fields that are necessary are the action and entryId. 

<!--
the row above and this part below should not change
-->
<mrss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ingestion.xsd">
<channel>
<item>
<action>update</action>
<!-- here you determine the entry ID you want to update -->
<entryId>0_bukomjmo</entryId>
<!--
name and description are textual values with little to none limitations (maybe just the length)
-->
<name>TEST</name>
<description>TEST</description>
<!--
only in the category part, write the categories by their accurate names. to show categories hierarchy, start with the highest one and put the > sign between them with no spaces. you can add or remove as much <category>XXX</category> fields as you wish. If the categories do not exist, like in the second example, they will be created
-->
<categories>
<category>Events>2014</category>
<category>Events>TEST</category>
</categories>
<!--
these fields below should also not change, unless you want to set a different custom metadataProfileId
-->
<customDataItems>
<customData metadataProfileId="906921">
<xmlData>
<metadata>
<!--
 these are textual fields, but note that in your metadata profile the 'event' and 'page' values are limited to one character
-->
<Page>1</Page>
<!--  'rider' and 'horse' are unlimited textual files -->
<Rider>TEST</Rider>
<Horse>TEST</Horse>
<!--
'Disciplines' is a field the is chosen from a list of values, meaning that if you will not choose a value from the list the file will fail completely
-->
<Disciplines>Arabian</Disciplines>
<!-- this part below should also not change -->
</metadata>
</xmlData>
</customData>
</customDataItems>
</item>
</channel>
</mrss>

When updating metadata, your XML file must include all existing custom metadata fields, not just the ones you want to change. Otherwise, omitted fields may be cleared or overwritten.

Example:

  • test1
  • test2
  • test3
  • {blank}

If you want to update field #4, your XML must include all the previous fields:

<xmlData>
  <metadata>
    <1>test1</1>
    <2>test2</2>
    <3>test3</3>
    <4>new content</4>
  </metadata>
</xmlData>

To remove all custom metadata from an entry, delete all content between <customDataItems> and </customDataItems>.

Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted.

In this article
Related articles
Back to top

Never miss a thing!

Subscribe to our customer newsletter and our release notes updates, so you always get the best out of Kaltura.
Newsletter