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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:40:27+00:00 2026-05-27T22:40:27+00:00

I wanted to generate some XML Schemas for my project. I have some Java

  • 0

I wanted to generate some XML Schemas for my project. I have some Java Classes, like this one:

package com.fortresswars.entity;

import com.fortresswars.entity.properties.Armor;
import com.jme3.scene.Spatial;

public abstract class Object extends Thing {
    public Armor armor;
    public short hpMax;
    public boolean walkable = false;

    public short hpCurrent;
    public boolean alive;
    public Spatial object;

    public GameObject() {
        this.hpMax = hpMax;
        this.hpCurrent = hpMax;
    }

    public void setAlive(boolean alive) {
        this.alive = alive;
    }

    public void setHpCurrent(short hpCurrent) {
        this.hpCurrent = hpCurrent;
    }

    public void addHpCurrent(short hpToAdd) {
        this.hpCurrent += hpToAdd;
    }
}

package com.fortresswars.entity;

import com.jme3.texture.Image;
import eu.javaspecialists.tools.apt.NoArgsConstructor;

@NoArgsConstructor
public abstract class Thing {
    Image icon;

    public Thing() {
    }
}

I wanted to generate a XML Schema based on those classes for my project, so the other developers can build a XML file based on that generated Schema and they can validate the information before sending to me. But I don’t know what is best, to generate a XML Schema based on a class, or generate a class based on a XML Schema. Please, could you point out what tools there is out there to do it, and the advantages of using each one of those approaches?

I know that there is a tool called JAXB, but I don’t know if it does both of those jobs, or any of them.

  • 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-27T22:40:27+00:00Added an answer on May 27, 2026 at 10:40 pm

    JAXB can do both

    1. Using JAXB schemagen tooling to generate an XML schema file from a Java class
    2. Using JAXB xjc tooling to generate JAXB classes from an XML schema file
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using EnvDTE to generate some code in my latest project. I have
Say I had an open-source project which I wanted to try and generate some
I am trying to generate some code using CodeDom. I wanted to know if
I wanted to generate one fix view using interface builder, but the size of
I wanted some of those spiffy rounded corners for a web project that I'm
Today I wanted to perform this task, and I run across some issues in
I wanted to throw this out there for some ideas. I'm writing a program
I wanted to generate digital signature in my asp.net application based on some value
I recently implemented a quick T4 template to generate some data access related classes
I'm about to port a smallish library from Java to Python and wanted some

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.