Jump to: navigation, search

Difference between revisions of "EclipseLink/Examples/MOXy/Dynamic/XmlToDynamicEntity"

< EclipseLink‎ | Examples‎ | MOXy‎ | Dynamic
(Overview)
Line 1: Line 1:
 
==Overview==
 
==Overview==
 
In this example you will learn how to unmarshal dynamic entities from XML.
 
In this example you will learn how to unmarshal dynamic entities from XML.
 +
 +
==Unmarshal DynamicEntities from XML==
 +
<source lang="java">
 +
FileInputStream xmlInputStream = new FileInputStream("src/example/dynamic/customer.xml");
 +
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
 +
DynamicEntity customer = (DynamicEntity) unmarshaller.unmarshal(xmlInputStream);
 +
</source>

Revision as of 11:13, 24 June 2010

Overview

In this example you will learn how to unmarshal dynamic entities from XML.

Unmarshal DynamicEntities from XML

FileInputStream xmlInputStream = new FileInputStream("src/example/dynamic/customer.xml");
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
DynamicEntity customer = (DynamicEntity) unmarshaller.unmarshal(xmlInputStream);