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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:32:21+00:00 2026-06-11T16:32:21+00:00

We have hundreds of XML files with no XML schema (XSD) defined in advance.

  • 0

We have hundreds of XML files with no XML schema (XSD) defined in advance. I was able to generate an XSD from one of those files with a tool (IntelliJ Idea), but it is not smart enough to recognize which elements and attributes are optional and which are required.

One way to automate that would be to reverse engineer XSD from multiple XML files using the following heuristic:

An attribute/element is optional (use="optional"/minOccurs=0) if in some instances it occurs and in other does not. Otherwise, it is required (use="required"/minOccurs=1).

Obviously, the heuristic would work also for a single XML file, if this XML is sufficiently representative.

For instance, aflightNumber would be considered optional given the following input:

   <list>
     <carrier name="BA" flightNumber="213" />
     <carrier name="CY" />
   </list>

Do you know any tool to generate XSD and recognize whether an attribute/element is optional?

  • 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-06-11T16:32:22+00:00Added an answer on June 11, 2026 at 4:32 pm

    Try QTAssistant (I am associated with it). Under the Tools tab

    enter image description here

    There’s an XSD from XMLs command.

    enter image description here

    Your XML files should ALL be in one folder. From the dialog box, you’ll have to select the ones you want to consider in generating the XSD(s). The XSDs will be generated in the same folder and loaded for you.

    However, I haven’t tried it for hundreds of XML files. If you run into any troubles, let me know through the support address on our web site. The download is free of charge to try it, but it requires registration.

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

Sidebar

Related Questions

I have a complex XSD schema and hundreds of XML files conforming to the
I am using classes that were generated from an XML schema using the xsd.exe
I have parametrized junit test that reads from several XML input files. In the
I currently have a php file that must read hundreds of XML files, I
i have hundreds of [mostly different] files in many different directories that all have
I have a trivial question for all of you. I have several build.xml files
I have an application that stores large amount of files (XML and binary) in
I have inherited a Visual Studio project that contains hundreds of files. I would
I have hundreds of jar files scattered across different projects that I need to
I am working on a system that will have several hundred thousand XML files,

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.