- xmlNodeSetContent( p, value + strlen( context->root ) + 1 );
- else
- xmlNodeSetContent( p, value );
+ value += strlen( context->root ) + 1;
+ p = xmlNewTextChild( node, NULL, "property", value );
+ xmlNewProp( p, "name", name );
+ }
+ }
+}
+
+static void serialise_store_properties( serialise_context context, mlt_properties properties, xmlNode *node, char *store )
+{
+ int i;
+ xmlNode *p;
+
+ // Enumerate the properties
+ for ( i = 0; store != NULL && i < mlt_properties_count( properties ); i++ )
+ {
+ char *name = mlt_properties_get_name( properties, i );
+ if ( !strncmp( name, store, strlen( store ) ) )
+ {
+ char *value = mlt_properties_get_value( properties, i );
+ if ( value != NULL )
+ {
+ if ( strcmp( context->root, "" ) && !strncmp( value, context->root, strlen( context->root ) ) )
+ value += strlen( context->root ) + 1;
+ p = xmlNewTextChild( node, NULL, "property", value );
+ xmlNewProp( p, "name", name );
+ }