This module provides a streaming XML reader for Splunk search results.
Splunk search results can be returned in a variety of formats including XML, JSON, and CSV. Search results in XML format are returned as a stream of XML fragments, not as a single XML document, to make it easier to stream search results. This module supports incrementally reading one result record at a time from such a result stream. This module also provides a friendly iterator-based interface for accessing search results while avoiding buffering of the result set, which can be very large.
To use the reader, instantiate ResultsReader on a search result stream:
reader = ResultsReader(result_stream)
for item in reader:
pprint(item)