private static void writeXML(Inspector pos, StringBuilder target) {
        target.append("<position ");
        for (java.util.Map.Entry<String, Inspector> entry : pos.fields()) {
            Inspector v = entry.getValue();
            if (v.type() == Type.STRING) {
                target.append(entry.getKey());
                target.append("=\"");
                target.append(entry.getValue().asString());
                target.append("\" ");
            }
            if (v.type() == Type.LONG) {
                target.append(entry.getKey());
                target.append("=\"");
                target.append(entry.getValue().asLong());
                target.append("\" ");
            }
        }
        target.append("/>");
    }
A wrapper for structured data representing an array of position values.
container-search/src/main/java/com/yahoo/search/result/PositionsData.java