public DhcpOptions unmarshall(StaxUnmarshallerContext context) throws Exception { DhcpOptions dhcpOptions = new DhcpOptions(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1;
public DhcpOptions unmarshall(StaxUnmarshallerContext context) throws Exception { DhcpOptions dhcpOptions = new DhcpOptions(); 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 dhcpOptions; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("dhcpOptionsId", targetDepth)) { dhcpOptions.setDhcpOptionsId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("dhcpConfigurationSet/item", targetDepth)) { dhcpOptions.getDhcpConfigurations().add(DhcpConfigurationStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("tagSet/item", targetDepth)) { dhcpOptions.getTags().add(TagStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { return dhcpOptions; } } } }
public DhcpOptions unmarshall(StaxUnmarshallerContext context) throws Exception { DhcpOptions dhcpOptions = new DhcpOptions(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1;