private void updateContext(XMLEvent event) {
        if (event == null) return;

        if (event.isEndElement()) {
            stack.pop();
            stackString = "";
            for (String s : stack) {
                stackString += "/" + s;
            }
        } else if (event.isStartElement()) {
            stack.push(event.asStartElement().getName().getLocalPart());
            stackString += "/" + event.asStartElement().getName().getLocalPart();
        } else if (event.isAttribute()) {
            Attribute attribute = (Attribute)event;
            stackString = "";
            for (String s : stack) {
                stackString += "/" + s;
            }
            stackString += "/@" + attribute.getName().getLocalPart();
        }
    }
Simple container for the details of a metadata expression this
unmarshaller context is looking for.
aws-java-sdk-core/src/main/java/com/amazonaws/transform/StaxUnmarshallerContext.java