I repeat NodeList to get Node data, but when using Node.innerHTML I get the tag names in lowercase.
Actual tags
<Panel><Label>test</Label></Panel>
as
<Panel><Label>test</Label></Panel>
I need these tags as is. Is it possible to get it with regex? I use it with dojo (is there a way in dojo?).
var xhrArgs = { url: "./user/"+Runtime.userName+"/ws/workspace/"+Workbench.getProject()+"/lib/custom/"+(first.type).replace(".","/")+".html", content: {}, sync:true, load: function(data){ var test = domConstruct.toDom(data); dojo.forEach(dojo.query("[id]",test),function(node){ domAttr.remove(node,"id"); }); var childEle = ""; dojo.forEach(test.childNodes,function(node){ if(node.innerHTML){ childEle+=node.innerHTML; } }); command.add(new ModifyCommand(newWidget,{},childEle,context)); } };
source share