On Fri Feb 14 02:30 PM, Marcel Kinard wrote:
> 
> On Feb 13, 2014, at 10:04 AM, Jonathan Bond-Caron
> <jbo...@gdesolutions.com> wrote:
> 
> > IBM most likely would prefer XML for the XSD & tooling...
> 
> Not necessarily. Schema validation is nice, but XML for the sake of XML 
> doesn't
> make sense. What makes more sense is following standards where reasonably
> possible. But if the widget spec is deprecated and we are making a conscious
> decision to abandon it, then the leaning for XML goes away. Given the audience
> of web devs, and the use of json config in other places, my preference would 
> be
> for json config. 

Great to have your opinion, my guesswork was that for a plugman based project 
on android for example, xml would be preferred.

> 
> > Note about xml vs. json config, Cordova could support both.
> 
> Cordova could, but that seems to me like overkill. If someone really wants 
> xml,
> how about providing an xslt that translates the xml to json, so they can 
> author in
> xml and Cordova could read json. But even that sounds like overkill too.

It turns out there's a great node lib called 'xml2js', the code to do this is 
pretty simple:
https://github.com/jbondc/cordova-labs/blob/master/cordova-lib/test.js

https://github.com/jbondc/cordova-labs/blob/master/cordova-lib/config.ts
https://github.com/jbondc/cordova-labs/blob/master/cordova-lib/config.js

So the idea here is:
- config.xml, config.json
- plugin.xml, plugin.json 

Would both be supported, with json being looked for first.

Reply via email to