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