Solved

Can JAXB be used in JBuilder 8.0 enterprise

Posted on 2003-11-18
5
341 Views
Last Modified: 2010-03-31
Can JAXB be used in JBuilder 8.0 enterprise edition? If so, are there tutorials or examples of any simple programs? It looks as though this is the path we will be taking for a new project at work.
0
Comment
Question by:plonergan
5 Comments
 
LVL 3

Expert Comment

by:yasser_helmy
Comment Utility
AFAIK, JAXB exists in JBuilder since version 6. Jbuilder 6 can parse xsl and dtd files and generate java classes to handle the xml files. the jbuilder help has a tutorial for using the tools to generate the java classes.
0
 

Author Comment

by:plonergan
Comment Utility
We will be using a Schema, not a DTD. I understand that Castor exists in JBuilder for this.
Our application will be polling a directory for new data which is in text form. We need to transform the text to xml to conform to our Schema and then use Castor's capabilities.
Any suggestions, I am ready to give up!!!!!
I will up the points to 500 for a very good answer with a simple example.
0
 
LVL 1

Accepted Solution

by:
FesterWim earned 100 total points
Comment Utility
The conversion from the text to the xml will probably be needed to be programmed in java.

For using JAXB, I would recommened writing a simple ant build file that does the JAXB compilation. Like this:

<project name="buildConfigurationJaxb" default="compileSchema" basedir=".">
      <property name="library.dir" value="${basedir}/../lib"/>

      <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
        <classpath>
              <fileset dir="${library.dir}">
                    <include name="jaxb/**/*.jar"/>
                    <include name="jaxp/**/*.jar"/>
                    <include name="jwsdp-shared/lib/**/*.jar"/>
              </fileset>
        </classpath>
      </taskdef>

      <target name="compileSchema" >
            <xjc schema="agenda-schema.xsd" target="." package="com.yourcompagny.targetpackage.jaxb"/>
      </target>
</project>
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now