Results 1 to 1 of 1
Thread: Using Marshaller/Unmarshaller
-
Using Marshaller/Unmarshaller
The example below unmarshals an XML file (foo.xml) and then marshals it on the console.
Java Code:JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" ); Unmarshaller u = jc.createUnmarshaller(); FooObject fooObj = (FooObject)u.unmarshal( new File( "foo.xml" ) ); Marshaller m = jc.createMarshaller(); m.marshal( fooObj, System.out );


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks