Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can JAXB be used in JBuilder 8.0 enterprise

Posted on 2003-11-18
5
Medium Priority
?
361 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
ID: 9777309
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
ID: 9795677
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 400 total points
ID: 9797073
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

926 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