if(!obj) return; if(obj.documentElement) obj=obj.documentElement; this.readCommonAttrs(obj); for(var i=0; i<obj.childNodes.length; i++){ var c=obj.childNodes[i]; if(c.localName=="text") this.property('label',c.childNodes.length?c.childNodes[0].nodeValue:''); else if(c.localName=="rect"){ if(c.getAttribute('x')!==null) this.start.x=parseFloat(c.getAttribute('x'), 10); if(c.getAttribute('width')!==null) this.end.x=parseFloat(c.getAttribute('width'), 10)+parseFloat(c.getAttribute('x'), 10); if(c.getAttribute('y')!==null) this.start.y=parseFloat(c.getAttribute('y'), 10); if(c.getAttribute('height')!==null) this.end.y=parseFloat(c.getAttribute('height'), 10)+parseFloat(c.getAttribute('y'), 10); if(c.getAttribute('r')!==null) this.radius=parseFloat(c.getAttribute('r'),10); } }