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 7626971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:23:51+00:00 2026-05-31T05:23:51+00:00

I need to configure an application in different ways.The configuration is in XML.Different configurations

  • 0

I need to configure an application in different ways.The configuration is in XML.Different configurations will mostly have common parts. For example the difference between two configurations will be a difference of an email address.

So rather than duplicating the common parts I was thinking is there a way to have a base XML file and override/add to only parts of it and generate a resultant XML file.

I’ve seen this functionality in Maven – you have a parent pom and the child pom inherits from it. What is used in the end is the effective pom.

1) Are there already libraries ( for any programming language but preferably for Java ) that does this?

2) If not what would be a good approach to implement this?I’m not very familiar with XML technologies such as XSD and XSLT. So the obvious way might not be as obvious to me.

Any help is much appreciated.

  • 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-31T05:23:52+00:00Added an answer on May 31, 2026 at 5:23 am

    I would probably use XInclude. There seems to be some support in Java, so I would search for “xinclude for java” with a qualifier for your specific stack.

    xerces copes well with it; the default if off, so you have to turn the feature http://apache.org/xml/features/xinclude on.

    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware(true);
    
    try {
        dbf.setFeature("http://apache.org/xml/features/xinclude", true);
    } 
    catch (ParserConfigurationException e) {
        System.err.println("could not set parser feature");
    }
    

    For a general read on XInclude, this article shows the concept at work.

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

Sidebar

Related Questions

I have a windows application (C#) and i need to configure it to run
My application can run on different environments. I need configure MY data model per
I have an ASP.NET MVC application where I need to allow to customers configure
In my program I need to programmatically configure an ApplicationContext. Specifically, I have a
How to (programmatically, without xml config) configure multiple loggers with Log4Net? I need them
We have a ASP.NET MVC with 4-5 different build configurations. Whenever we change the
I have written an SWT Java application and would like to configure it to
My application calls RemotingConfiguration.Configure() to set up .NET Remoting. But since I need the
have you struggled with Linux deployment before? I need to deploy an application into
I need to configure Tomcat memory settings as part of a larger installation, so

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.