Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
XML and Related Technologies
JAXP and Xerces or JAXB
Shane Lee
Ranch Hand
Posts: 63
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Just enquiring on reading in an xml file and mapping to
java
objects, which way is better, JAXP and Xerces or JAXB on a JEE5 application?
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
JAXB is now part of Java 6 so it's easier to use than having to configure
JEE
.
I've just started using it, and while it's a bit cantankerous, it's a lot better (in my opinion) than having to roll your own.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Shane Lee
Ranch Hand
Posts: 63
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks for that. Do you have a sample build.xml file to use in an
IDE
, as i will not be doing the java bindings on the command line?
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Here's the
ant
task I use to generate the representation classes:
<target name="representations" depends="init"> <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask"> <classpath> <fileset dir="${common.lib}/jaxb" includes="*.jar"/> </classpath> </taskdef> <xjc destdir="src" extension="true"> <schema dir="${representations.schemas.folder}" includes="*.xsd"/> <produces dir="${representations.folder}" includes="**/*"/> </xjc> </target>
Don't ask
too
many question about it... it took me a while to tinker it to do what I wanted, and I'm not sure I understand it all 100%.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
bacon. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
What is JAXP?
JAXB Parser
JAXP
How do you parse an XML File?
JAXP VS Xerces
More...