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=="path"){ // the line var d=c.getAttribute('d').split(" "); var s=d[0].split(","); this.start.x=parseFloat(s[0].substr(1),10); this.start.y=parseFloat(s[1],10); s=d[1].split(","); this.control.x=parseFloat(s[0].substr(1),10); this.control.y=parseFloat(s[1],10); s=d[2].split(","); this.end.x=parseFloat(s[0],10); this.end.y=parseFloat(s[1],10); } }