1 define(['libs/jquery', 'libs/underscore'], function($, _) {
6 getMetadata: function(xml) {
8 $(xml).find('metadata').children().each(function() {
10 toret[this.nodeName.split(':')[1].toLowerCase()] = node.text();
14 getXML: function(metadata) {
15 var meta = $('<metadata></metadata>\n');
16 _.each(_.keys(metadata), function(key) {
17 meta.append('\n\t<dc:'+key+'>' + metadata[key] + '</dc:'+key+'>');
20 /* globals vkbeautify */
21 return vkbeautify.xml(meta.html());