[Dev] [Carbon 5] Use Java DOM for parsing config files instead of Axiom?

2013-03-11 Thread Afkham Azeez
Folks, The Carbon 5 hackathon team has been thinking about using DOM instead of Axiom for parsing XML files. The rationale is to use Axiom where is it appropriate, only where necessary to make Carbon kernel code less coupled with Axiom. Axiom APIs are great but they are non-standard. Besides, we

Re: [Dev] [Carbon 5] Use Java DOM for parsing config files instead of Axiom?

2013-03-11 Thread Tharindu Mathew
+1, makes sense On Mon, Mar 11, 2013 at 8:39 PM, Afkham Azeez az...@wso2.com wrote: Folks, The Carbon 5 hackathon team has been thinking about using DOM instead of Axiom for parsing XML files. The rationale is to use Axiom where is it appropriate, only where necessary to make Carbon kernel

Re: [Dev] [Carbon 5] Use Java DOM for parsing config files instead of Axiom?

2013-03-11 Thread Sagara Gunathunga
On Mon, Mar 11, 2013 at 8:39 PM, Afkham Azeez az...@wso2.com wrote: Folks, The Carbon 5 hackathon team has been thinking about using DOM instead of Axiom for parsing XML files. The rationale is to use Axiom where is it appropriate, only where necessary to make Carbon kernel code less coupled

Re: [Dev] [Carbon 5] Use Java DOM for parsing config files instead of Axiom?

2013-03-11 Thread Sameera Jayasoma
+1. I've been using DOM parsing instead of Axiom in my projects for some time. But we need to come up with a DOM utility module. LIke helper module. Thanks, Sameera. On Mon, Mar 11, 2013 at 8:09 AM, Afkham Azeez az...@wso2.com wrote: Folks, The Carbon 5 hackathon team has been thinking

Re: [Dev] [Carbon 5] Use Java DOM for parsing config files instead of Axiom?

2013-03-11 Thread Paul Fremantle
Should we consider moving Config files to JSON?! I personally prefer XML for config but maybe I'm just old school. Paul On 11 March 2013 17:43, Sameera Jayasoma same...@wso2.com wrote: +1. I've been using DOM parsing instead of Axiom in my projects for some time. But we need to come up

Re: [Dev] [Carbon 5] Use Java DOM for parsing config files instead of Axiom?

2013-03-11 Thread Afkham Azeez
On Mon, Mar 11, 2013 at 11:25 PM, Paul Fremantle p...@wso2.com wrote: Should we consider moving Config files to JSON?! I personally prefer XML for config but maybe I'm just old school. I like the idea of moving to JSON which I brought up sometime back, but not many people agreed at that time.

Re: [Dev] [Carbon 5] Use Java DOM for parsing config files instead of Axiom?

2013-03-11 Thread Afkham Azeez
Here is a sample settings.json file. Quite elegant compared to an XML config, I would say. { blocklist-enabled: 0, download-dir: \/media\/store\/incoming, download-limit: 100, download-limit-enabled: 0, encryption: 2, max-peers-global: 200, peer-port: 51413, pex-enabled: 1,

Re: [Dev] [Carbon 5] Use Java DOM for parsing config files instead of Axiom?

2013-03-11 Thread Paul Fremantle
Actually that looks pretty nice. I guess the previous examples I've seen weren't pretty printed. Paul On 11 March 2013 18:53, Afkham Azeez az...@wso2.com wrote: Here is a sample settings.json file. Quite elegant compared to an XML config, I would say. { blocklist-enabled: 0, download-dir:

Re: [Dev] [Carbon 5] Use Java DOM for parsing config files instead of Axiom?

2013-03-11 Thread Pradeep Fernando
Hi, But you can get the same clarity level by using xml attributes. Took the below config from tomcat server.xml. Looks pretty much same to me. :) Connector protocol=org.apache.coyote.http11.Http11NioProtocol port=9443 bindOnInit=false

Re: [Dev] [Carbon 5] Use Java DOM for parsing config files instead of Axiom?

2013-03-11 Thread Afkham Azeez
On Tue, Mar 12, 2013 at 9:23 AM, Pradeep Fernando prad...@wso2.com wrote: Hi, But you can get the same clarity level by using xml attributes. Took the below config from tomcat server.xml. Looks pretty much same to me. :) Connector protocol=org.apache.coyote.http11.Http11NioProtocol