Search code examples
xmlxmlbeans

XMLBean setting tag order


I can successfully parse an xml file and also create one. I am running into an issue when I export the xml because the tags need to be in a certain order and xmlbeans puts the tags alphabetically. Any suggestions would be appreciated

                <Line>
                    <Minutes/>
                    <Charges>5.00<Charges>
                    <ClientTotal>1.00<ClientTotal>
                    <Service>R20<Service>
                    <DateOfService>01-28-2015<DateOfService>
                    <Units/>
                </Line>

VS:

                <Line>
                    <Charges>5.00<Charges>
                    <ClientTotal>1.00<ClientTotal>
                    <DateOfService>01-28-2015<DateOfService>
                    <Minutes/>
                    <Service>R20<Service>
                    <Units/>
                </Line>

Solution

  • I changed the ordered of the WSDL file tags that the vendor supplied and that fixed the issue.