This program is useful when we are focusing on the textual content enclosed between the XML tags. This program does not focus on extracting the any XML tag attributes or values.

Sample input .xml file:

Output text extracted from XML above:

Python code: