private void processData(final StoreNode node,
                             final Buffer buffer,
                             final Match parentMatch,
                             final int parentMatchCount,
                             final int level,
                             final MatchOrder matchOrder,
                             final boolean ignoreErrors)
            throws IOException, SAXException {
        boolean outputEndElement = false;
        if (node.getNodeType() == NodeType.DATA) {
            final Data data = (Data) node;

            // Output name and value if required.
            final String name = normaliseBuffer(data.lookupName(parentMatchCount));
            final String value = normaliseBuffer(data.lookupValue(parentMatchCount));

            // Start the record if we aren't already in one.
            startRecord();

            // Start a data element for this record.
            startData(name, value);

            // Record that we need to output end element.
            outputEndElement = true;
        }

        // Process the buffer with sub expressions.
        process(node,
                buffer,
                parentMatch,
                parentMatchCount,
                level + 1,
                matchOrder,
                ignoreErrors);
        // Output the end element for data if we outputted a start element.
        if (outputEndElement) {
            endData();
        }
    }
Outputs a data element if required using the current match or another
stored match.
stroom-pipeline/src/main/java/stroom/pipeline/xml/converter/ds3/DS3Parser.java