- if(div.attr('wlxml-class'))
- toret.attr('class', div.attr('wlxml-class'))
+
+ for(var i = 0; i < this.attributes.length; i++) {
+ var attr = this.attributes.item(i);
+ var split = attr.name.split('-')
+ console.log(split);
+ if(split[0] !== 'wlxml' || (split.length > 1 && split[1] === 'tag'))
+ continue;
+ var wlxmlName = split.splice(1).join('-');
+ var value = wlxmlName === 'class' ? attr.value.replace(/-/g, '.') : attr.value;
+ console.log(name + ': ' + value);
+ toret.attr(wlxmlName, value);
+ }
+