class_docstr: Corpus reader for corpora whose documents are xml files.
  
  Note that the ``XMLCorpusReader`` constructor does not take an
  ``encoding`` argument, because the unicode encoding is specified by
  the XML files themselves.  See the XML specs for more info.
class_docstr_tok: ["Corpus","reader","for","corpora","whose","documents","are","xml","files",".","Note","that","the","``","XMLCorpusReader","``","constructor","does","not","take","an","``","encoding","``","argument",",","because","the","unicode","encoding","is","specified","by","the","XML","files","themselves",".","See","the","XML","specs","for","more","info","."]
docstr: Returns all of the words and punctuation symbols in the specified file
  that were in text nodes -- ie, tags are ignored. Like the xml() method,
  fileid can only specify one file.
  
  :return: the given file's text nodes as a list of words and punctuation symbols
  :rtype: list(str)
docstr_tok: ["Returns","all","of","the","words","and","punctuation","symbols","in","the","specified","file","that","were","in","text","nodes","--","ie",",","tags","are","ignored",".","Like","the","xml","(",")","method",",","fileid","can","only","specify","one","file",".",":","return",":","the","given","file","'s","text","nodes","as","a","list","of","words","and","punctuation","symbols",":","rtype",":","list","(","str",")"]
code: def words(self, fileid=None):
      """
      Returns all of the words and punctuation symbols in the specified file
      that were in text nodes -- ie, tags are ignored. Like the xml() method,
      fileid can only specify one file.
  
      :return: the given file's text nodes as a list of words and punctuation symbols
      :rtype: list(str)
      """
  
      elt = self.xml(fileid)
      encoding = self.encoding(fileid)
      word_tokenizer = WordPunctTokenizer()
      try:
          iterator = elt.getiterator()
      except:
          iterator = elt.iter()
      out = []
  
      for node in iterator:
          text = node.text
          if text is not None:
              if isinstance(text, bytes):
                  text = text.decode(encoding)
              toks = word_tokenizer.tokenize(text)
              out.extend(toks)
      return out
  
file_path: nltk/nltk/corpus/reader/xmldocs.py
imports: import codecs
  from xml.etree import ElementTree
  from nltk.corpus.reader.api import CorpusReader
  from nltk.corpus.reader.util import *
  from nltk.data import SeekableUnicodeStreamReader
  from nltk.internals import ElementWrapper
  from nltk.tokenize import WordPunctTokenizer
label_desc: Use image node_id 3 for calling the XMLCorpusReader obj's underlying member method code with example usage: obj.words(fileid) and returns: out