public CreateApplicationVersionResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreateApplicationVersionResult createApplicationVersionResult = new CreateApplicationVersionResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createApplicationVersionResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("ApplicationVersion", targetDepth)) { createApplicationVersionResult.setApplicationVersion(ApplicationVersionDescriptionStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createApplicationVersionResult; } } } }
public CreateApplicationVersionResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreateApplicationVersionResult createApplicationVersionResult = new CreateApplicationVersionResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createApplicationVersionResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("ApplicationVersion", targetDepth)) { createApplicationVersionResult.setApplicationVersion(ApplicationVersionDescriptionStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createApplicationVersionResult; } } } }