1 define(['libs/jquery'], 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 return vkbeautify.xml(meta.html());