Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4609982
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:03:59+00:00 2026-05-22T01:03:59+00:00

I work with an application that uses a large set of xml interfaces for

  • 0

I work with an application that uses a large set of xml interfaces for integration and data import / export. We use JAXB to map from those interfaces to our domain object model. One challenge we frequently face is how to deal with the need to change to the these interfaces during the course of a project in the face of new requirements.

In the ideal world, all requirements are known up front. The xml specification would be drafted to reflect those requirements and then never changed. In the real world though, gaps that impact the interfaces are discovered throughout the lifecycle of the project. Some of these changes are benign in their impact (ex. introducing a new non-required field). For other types of changes though, there is an option to implement them in an “unclean” way that preserves backward compatibility or a “cleaner” method which does not.

For example, let’s say that there is a new requirement to add ‘Field2’ everywhere that ‘Field1’ appears in the schema. Since ‘Field1’ and ‘Field2’ are functionally / logically grouped, the most natural approach (we’ll call it “Approach 1”) is to replace usages of:

<Field1></Field1>

with

<GroupingName>
    <Field1></Field1>
    <Field2></Field2>
</GropuingName>

The nice thing about Approach 1 is that it is easy to implement and maintain. The big disadvantage is that it has broken the interface. All existing XPath’s to Field1 have to be changed. The alternative (“Approach 2”) is to introduce Field2 alongside Field1 without the grouping tag.

<Field1></Field1>
<Field2></Field2>

Approach 2 preserves backward compatability but violates ‘DRY’ and does not guarantee that Field2 appears everywhere the Field1 does.

My question is, what are the industry standards / best-practices for handling xml changes in the face of new requirements Is it:

  1. Force apporach 1 on the customer (new requirements = interface changes)
  2. Hold your nose and take on approach 2.
  3. Branch the code base. Implement approach 2 in the branch and take on approach 1 in the main trunk. (Less workable at the beginning of the project).
  4. Other?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:04:00+00:00Added an answer on May 22, 2026 at 1:04 am

    Modify the XSD to define a named group; not a complex type:

    and replace each element declaration of “Field1” with
    this insures that “Field2” must occur following “Field1” everywhere “Field1” occurs.
    Set if the occurance is optional.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is an application where I work that uses the Microsoft XML parser 3.0.
I am developing large data collecting ASP.Net/Windows service application-pair that uses Microsoft SQL Server
I work on an application that uses DCOM to communicate between what are essentially
Weve recently been trying to work on an application that uses pandastream to encode
I work on a web application that modifies a XML document that is stored
I have a large application which Just afew Pages of that uses ViewState. I
I work on a fairly simple but large two-tier application that consists approximately 40
I'm working on an ipad application that needs to work with images; it uses
I work on an application that has a both a GUI (graphical) and API
I've a application that must work after another application. This second application has a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.