Smart XML to Javscript-Object converter