@theoborrero Hey, iam trying to do the same ecporting search results in xml/json format using splunk sdk java..but my script is not returning any output in console..could you please help me on it.
MultiResultsReaderXml multiResultsReader = new MultiResultsReaderXml(stream);
try {
int counter = 0; // count the number of events
for (SearchResults searchResults : multiResultsReader) {
for (Event event : searchResults) {
System.out.println("***** Event " + counter++ + " *****");
for (String key : event.keySet())
System.out.println(" " + key + ": " + event.get(key));
}
}
multiResultsReader.close();
}
... View more