- withThemes(function() {
- var xml = options.xml.replace(/\/\s+/g, '<br />');
- var parser = new DOMParser();
- var serializer = new XMLSerializer();
- var doc = parser.parseFromString(xml, 'text/xml');
- var error = $('parsererror', doc);
-
- if (error.length == 0) {
- doc = xml2htmlStylesheet.transformToFragment(doc, document);
- console.log(doc.firstChild);
-
- if(doc.firstChild === null) {
- options.error("Błąd w przetwarzaniu XML.");
- return;
- }
-
- error = $('parsererror', doc);
+ var xml = options.xml.replace(/\/(\s+)/g, '<br />$1');
+ var parser = new DOMParser();
+ var serializer = new XMLSerializer();
+ var doc = parser.parseFromString(xml, 'text/xml');
+ var error = $('parsererror', doc);
+
+ if (error.length == 0) {
+ doc = xml2htmlStylesheet.transformToFragment(doc, document);
+ console.log(doc.firstChild);
+
+ if(doc.firstChild === null) {
+ options.error("Błąd w przetwarzaniu XML.");
+ return;