Article:
 |
|
Generating an XML Document with JAXB
|
| Subject: |
|
unmarshalling |
| Date: |
|
2009-03-10 02:10:44 |
| From: |
|
suris
|
|
|
hi,
i tried to follo the steps for unmarshalling...
Unmarshaller unMarshaller = jaxbContext.createUnmarshaller();
JAXBElement<JournalType> journalElement = (JAXBElement<JournalType>)
unMarshaller.unmarshal(new StreamSource(new ByteArrayInputStream(xml.getBytes())),JournalType.class);
JournalType journal= journalElement.getValue();
but when i want to print article from journal, it is printing null value.
|
Showing messages 1 through 1 of 1.
Unmarshaller unMarshaller = jaxbContext.createUnmarshaller();
JAXBElement<JournalType> journalElement = (JAXBElement<JournalType>)
unMarshaller.unmarshal(new StreamSource(new ByteArrayInputStream(xml.getBytes())),JournalType.class);
JournalType journal= journalElement.getValue();
Does a different unmarshall method unmarshall?