code+="\n\t\tthrow WobXmlException(translate(\""+abstractClassName(cls)+"\",\"Unable to deserialize object of type "+className(cls)+": invalid XML.\"));";
code+="\n\treturn self::fromXml($xml,$xml->documentElement);\n}\n";
code+="static public function fromXml($xml,$elem){\n\t$data=new "+className(cls)+"();\n";
- code+="\treturn $data;\n}\n";
+ code+="\tself::fromXmlHelper($data,$xml,$elem);\n\treturn $data;\n}\n";
code+="static protected function fromXmlHelper($data,$xml,$elem){\n";
code+="\tparent::fromXmlHelper($data,$xml,$elem);\n";
k=cls.propertyNames();