org.xml.sax.InputSource.isEmpty
method
public isEmpty() as Boolean:
Description

Indicates whether no input information is present.

Returns

True when all identifiers and streams are absent.

Example
if input.isEmpty():
print("no XML input")