Have you slept well?
Anyway, here you go with a fix. I've left out the control/element typing. You can do that by retrieving the "xsi:type" attribute of a selected node (so K.item()). I've also included a prototype of my own JSON interpreter, but it does
not return valid JSON yet. It's only to give you a basic idea of the object that has been created by parseFile().