I am using the tutorial here for understanding JAXB.
When the writer comes to create the root of the document, the writer begins as below:
//This statement means that class "Bookstore.java" is the root-element of our example
@XmlRootElement(namespace = "de.vogella.xml.jaxb.model")
public class Bookstore {
...
}
Although I will be manually generating my classes rather than letting Eclipse do it, I will supply an XSD
with my jar file (not packed inside but rather in the folder containing jar file) so that when my application starts, it will validate whether the XML document has been tampered with.
So, in the XSD file, the targetNamespace
will be de.vogella.xml.jaxb.model
because it was declared above as @XmlRootElement(namespace = "de.vogella.xml.jaxb.model")
?
package-info
and modify the above content as needed ? Cool!. I will look into what you said but what about my original question ? :) Was my inference correct – Connacht