I use custom response handlers in the REST setup for pre processing , and in this case , event splitting.
Add something like this to rest_ta/bin/responsehandlers.py (example only , tweak as need be) :
class XMLResponseHandler:
def __init__(self,**args):
pass
def __call__(self, response_object,raw_response_output,response_type,req_args,endpoint):
from xml.etree import ElementTree
e = ElementTree.fromstring(raw_response_output)
for entity in e.findall('entity'):
print_xml_stream(ElementTree.tostring(entity).decode())
And then declare it to be applied to your input :
... View more