private void inspectProperty(final ObjectMapper objectMapper,
                                 final List<String> xPaths,
                                 final StringBuilder xPathBuilder,
                                 final int depth,
                                 final BeanPropertyDefinition property) throws Exception {
        final String propName = property.getName();
        try {
            final AnnotatedField propField = property.getField();
            final XmlElement xmlElemAnno = propField.getAnnotation(XmlElement.class);
            final XmlAttribute xmlAttrAnno = propField.getAnnotation(XmlAttribute.class);
            final AnnotatedMethod setter = property.getSetter();
            final AnnotatedMethod getter = property.getGetter();
            final JavaType propType = property.getPrimaryType();
            final Class<?> propClass = propType.getRawClass();

            if (xmlElemAnno != null) {
                final String propElmName = xmlElemAnno.name();
                if (propClass.getName().startsWith("event.logging")
                        && !Void.class.equals(propClass)) {

                    inspectClass(objectMapper,
                            xPaths,
                            new StringBuilder(
                                    xPathBuilder),
                            propElmName,
                            propClass,
                            depth + 1,
                            false);
                } else if (List.class.isAssignableFrom(propClass)) {
                    final JavaType propSubType = propType.findTypeParameters(List.class)[0];
                    if (propSubType.getRawClass().getName().startsWith("event.logging")
                            && !Void.class.equals(propSubType.getRawClass())) {
                        inspectClass(objectMapper,
                                xPaths,
                                new StringBuilder(xPathBuilder),
                                propElmName,
                                propSubType.getRawClass(),
                                depth + 1,
                                true);
                    }
                } else {
                    // not recursing
                }
            } else if (xmlAttrAnno != null) {
                xPaths.add(xPathBuilder +
                        "/@" +
                        xmlAttrAnno.name());
            }
        } catch (Exception e) {
            LOGGER.error(LogUtil.message("Unable to inspect prop {} at path {} - {}",
                    propName, xPathBuilder.toString(), e.getMessage()));
        }
    }
<p>
This was a partial attempt at generating all the possible xpaths for the event logging schema,
baring infinite recursion.
</p><p>
Seems to be missing some elements due to getField returning null. Also is not doing anything about
choice elements or handling sub-classed things.
</p>
stroom-event-logging/stroom-event-logging-impl/src/test/java/stroom/event/logging/impl/GenerateXPaths.java