Re: [Dev] Maintaining the order for XML payloads in JSON schema - Data Mapper

2016-06-20 Thread Nuwan Pallewela
Problem is that we can not say that we are not guarantee the order of the xml elements in data mapper. As there are some well known API's who consider the order(some Salesforce API's), we have to support the order in xml elements from our side. Otherwise there will be issues when user going to use

Re: [Dev] Maintaining the order for XML payloads in JSON schema - Data Mapper

2016-06-20 Thread Harsha Thirimanna
As in the spec , it can be choice, seq or mixed, right ? The ELEMENT Type Declaration can be used within an DTD to define the contents on an element within the XML document. Is that ok to make sequence for all the cases ? *Harsha Thirimanna* Associate Tech Lead; WSO2, Inc.; http://wso2.com *

Re: [Dev] Maintaining the order for XML payloads in JSON schema - Data Mapper

2016-06-20 Thread Nuwan Pallewela
Hi Harsha, We can find this in section 3.2.1 Element Content in the W3C recommendation[1]. [1] https://www.w3.org/TR/REC-xml/ Thanks, Nuwan On Tue, Jun 21, 2016 at 10:02 AM, Harsha Thirimanna wrote: > Hi Nuwan, > > Thanks for pointing that, can you please point that specification location > p

Re: [Dev] Maintaining the order for XML payloads in JSON schema - Data Mapper

2016-06-20 Thread Harsha Thirimanna
Hi Nuwan, Thanks for pointing that, can you please point that specification location please ? *Harsha Thirimanna* Associate Tech Lead; WSO2, Inc.; http://wso2.com * * *email: **hars...@wso2.com* * cell: +94 71 5186770 * *twitter: **http://twitter.com/

Re: [Dev] Maintaining the order for XML payloads in JSON schema - Data Mapper

2016-06-20 Thread Nuwan Pallewela
Hi Harsha, On Tue, Jun 21, 2016 at 9:27 AM, Harsha Thirimanna wrote: > Hi Sohani, > Just wanted to know one thing and please make me correct if i am wrong > here. > > Normally, XML elements don't have an order and any implementation should > not depend on the order of the elements in XML file ex

Re: [Dev] Maintaining the order for XML payloads in JSON schema - Data Mapper

2016-06-20 Thread Harsha Thirimanna
Hi Sohani, Just wanted to know one thing and please make me correct if i am wrong here. Normally, XML elements don't have an order and any implementation should not depend on the order of the elements in XML file except if it has a XSD and saying it as a sequence. So why do we need to concern abou

Re: [Dev] Maintaining the order for XML payloads in JSON schema - Data Mapper

2016-06-20 Thread Sohani Weerasinghe
Thanks Chanaka for the input Regards, Sohani Sohani Weerasinghe Senior Software Engineer WSO2, Inc: http://wso2.com Mobile : +94 716439774 Blog :http://christinetechtips.blogspot.com/ Twitter : https://twitter.com/sohanichristine On Mon, Jun 20, 2016 at 4:20 PM, Chanaka Fernando wrote:

Re: [Dev] Maintaining the order for XML payloads in JSON schema - Data Mapper

2016-06-20 Thread Chanaka Fernando
Hi Sohani, +1 to use LinkedHashMaps instead of HashMaps since former make sure the order of the items as you have mentioned. LinkedHashMaps has a higher memory footprint but it has a better performance when accessing values in the map (refer [1]). If we need a guarantee in the order of items we in