You can also do the opposite: generating Java Beans from XSD Schema.
To do that, there the xjc utility in $JAVA_HOME/bin.
For example:
$ wget http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
$ xjc -p eu.kostia.persistence persistence_1_0.xsd
will generate the classes ObjectFactory, Persistence and PersistenceUnitTransactionType in the package eu.kostia.persistence.
Other useful info here.