After some thought, I couldn’t agree more with your suggestions… Thanks
I worked a bit more in the content type manager tool and things are starting to go into the right direction in my point of view:
I completely changed the way I was seeing / trying to solve the problem. Now the tool is basically a way to go from XML → JSON, mutate that JSON using a GUI, and then go back from JSON → XML.
I was facing some problems, mainly because most of the libraries that performs that conversions are not robust enough. The main problems were:
- The transformation defined as the composition of the transformations XML → JSON → XML wasn’t preserved as the identity function;
- The transformations weren’t preserving the order of the elements.
After some struggle I was able to find a XML <–> JSON lib that worked perfectly.
As you can see I followed your suggestion to use the File System Access API
The only problem that I see is that it’s not currently supported by some browsers. What do you think?
There’s still a lot to work on, but I’d like to ask for some suggestions. @tom already gave me some good ones that I’ll be implementing in near future. Thank you Tom.
@tom, I hope to post the code on GitHub by the end of this week. I was expecting to release the code sooner, but since the @tsi suggestions, I started to mess around with a lot of different ways to attack the problem and therefore wasn’t focusing on the quality of it.