Skip to content

Commit

Permalink
[ YC-000 ] improved XML parsing capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
inspire-software committed Aug 31, 2022
1 parent 6d8cadf commit 01f3f83
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,11 @@ public void endElement(String namespaceURI, String localName, String qName) thro

// then retrieve the fully unmarshalled object
try {
final JAXBElement<Object> result =
(JAXBElement<Object>)unmarshallerHandler.getResult();
final Object objResult = unmarshallerHandler.getResult();
final Object el = objResult instanceof JAXBElement ?
((JAXBElement) objResult).getValue() : objResult;
// process this new purchase order
callback.handle(new XmlImportTupleImpl(elementStart, result.getValue()));
callback.handle(new XmlImportTupleImpl(elementStart, el));
} catch( JAXBException je ) {

exception.handle(elementStart, je);
Expand Down

0 comments on commit 01f3f83

Please sign in to comment.