Idml support

Yes, to start I copy-pasted some code, so I would like to keep the copyright notice as is.