Thanks for the reply !! I would like to explain the need in details.
We have an existing writer/parser implementation that uses libxml2. we are working on a corresponding c++ implementation. Since the existing code is critical so as a test strategy we decided to match the outcomes of the two implementations (because manually comparing complete xmls will require humungous effort). The issue is that the attributes in the xml formed by using libxml2 are not ordered, but they are ordered in xerces hence the test cases fail. - Thanks, Aachin On Wed, Jan 15, 2014 at 9:28 PM, Michael Glavassevich <[email protected]>wrote: > Hello, > > I'm not sure why that matters to you but you should be aware that the > attributes of an element are an unordered set [1]. Applications that > process the XML you write should not be depending on the order of > attributes. > > Thanks. > > [1] http://www.w3.org/TR/xml-infoset/#infoitem.element > > Michael Glavassevich > XML Technologies and WAS Development > IBM Toronto Lab > E-mail: [email protected] > E-mail: [email protected] > > Aachin Chalana <[email protected]> wrote on 01/15/2014 01:02:20 AM: > > > From: Aachin Chalana <[email protected]> > > To: [email protected], > > Date: 01/15/2014 01:03 AM > > Subject: Regarding auto sorting of attributes > > > > Hello, > > > > I am working on a writer implementation using xerces c++ library. > > > > Currently all the attributes I add are getting sorted. I am not able to > > prevent this auto sorting. > > > > Please help if there is a workaround available. > > > > Thanks in advance ! > > > > - > > Aachin > >
