The Unmarshal palette icon action will generate template code to unmarshal a JAXB object. This allows for any global XML element declared in the schema to be unmarshalled as the root of an instance document. The JAXBContext object allows the merging of global elements across a set of schemas (listed in the contextPath). This means that a client application is able to unmarshal XML documents that are instances of any of the schemas listed in the contextPath. You must know the Class name of the object you are trying to unmarshal. Since each schema in the schema set can belong to distinct namespaces, the unification of schemas to an unmarshalling context should be namespace-independent. You can search for the class using the Find... button. The template code can be generated to unmarshal a JAXB object from a String, InputStream, File, Reader, or byte array.
The Code-Seeder currently generates code using a single package name in the context path. You may want to edit the code if more than one package name is needed in the context path.
To unmarshal an existing JAXB class object, drag and drop the JAXB Unmarshal palette icon into the IDE editor.
The Generate JAXB Unmarshal code dialog box is displayed.
Enter the JAXB object's class name or use the Find... button to search for the class. (as in the Construct's Figure 1–3section)
Select the Unmarshal From option. You can generate the code to unmarshal a JAXB object from one of String, Reader, InputStream, JMSTextMessage, or File.
The Unmarshal Method will be generated as shown below.