private static void UnmarshallResult(XmlUnmarshallerContext context,GetBucketLocationResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("LocationConstraint", targetDepth)) { response.Location = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetBucketLocationResponse response = new GetBucketLocationResponse(); UnmarshallResult(context,response); return response; }