Take the 2-minute tour ×  I have a corpus with tens of thousands
of XML file (small sized files) and I'm trying to use Python and
extract the text contained in one of the XML tags, for example,
everything between the body tags for something like:  <body>
sample text here with <bold> nested </bold> tags in this
paragraph </body>  and then write a text document that contains
this string, and move on down the list of XML files.  I'm using
effbot's ELementTree but couldn't find the right commands/syntax
to do this. I found a website that uses miniDOM's
dom.getElementsByTagName but I'm not sure what the corresponding
method is for ElementTree. Any ideas would be greatly
appreciated.  share|improve this question I'd start with reading
some tutorials then; the Dive into Python 3 XML chapter would be
a good start. –  Martijn Pieters Jun 16 '12 at 16:10 in your
example, do you want to also get the tags <bold> or only the
text inside it? –  F.C. Jun 16 '12 at 16:11 And is there any
content other outside of the body tag