public InternetGateway unmarshall(StaxUnmarshallerContext context) throws Exception { InternetGateway internetGateway = new InternetGateway(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1;
public InternetGateway unmarshall(StaxUnmarshallerContext context) throws Exception { InternetGateway internetGateway = new InternetGateway(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) return internetGateway; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("internetGatewayId", targetDepth)) { internetGateway.setInternetGatewayId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("attachmentSet/item", targetDepth)) { internetGateway.getAttachments().add(InternetGatewayAttachmentStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("tagSet/item", targetDepth)) { internetGateway.getTags().add(TagStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { return internetGateway; } } } }
public InternetGateway unmarshall(StaxUnmarshallerContext context) throws Exception { InternetGateway internetGateway = new InternetGateway(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1;