This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XML Schema and JAXB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Schema and JAXB" Watch "XML Schema and JAXB" New topic

XML Schema and JAXB

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345


I do not understand one thing from the tutorials that I see from SUN is that to use JAXB, we need only a Schema defined and from the schema, we derive the Java sources. From where do the XML come from? As far as I understood, from the Java Sources we can marshall it to an XML document. Am I right?

I'm referring to the tutorial here.

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345

Can anyone please help me on how I can represent a Collection type in an XML Schema? For example, I have in my Java class (I'm using JAXB) as follows,

How can I represent the above Collection variable in an XML schema?
Moshe Elisha

Joined: Jun 11, 2007
Posts: 2
You can try looking here:

Practical XML Schema
It is sorta covered in the JavaRanch Style Guide.
subject: XML Schema and JAXB
Similar Threads
Is there a java API to generate xml with an inline schema definition
Java Objects to XML Mapping
Need help with XML Parsing on SOAP
JAXB Customization
JAXB Features?