class_docstr: Base class for defining how to parse xml-based image snippets.
  
  Image-specific parsers should define:
      StartElementHandler
      EndElementHandler
      CharacterDataHandler
class_docstr_tok: ["Base","class","for","defining","how","to","parse","xml-based","image","snippets",".","Image-specific","parsers","should","define",":","StartElementHandler","EndElementHandler","CharacterDataHandler"]
docstr: Internal function that allows subclasses to mess
  with the underlying parser, if desired.
docstr_tok: ["Internal","function","that","allows","subclasses","to","mess","with","the","underlying","parser",",","if","desired","."]
code: def _create_parser(self):
      """Internal function that allows subclasses to mess
      with the underlying parser, if desired."""
  
      parser = ParserCreate(encoding=self.encoding)  # from xml package
      parser.buffer_text = True
      if self.buffer_size is not None:
          parser.buffer_size = self.buffer_size
      return parser
  
file_path: nibabel/nibabel/xmlutils.py
imports: from io import BytesIO
  from xml.etree.ElementTree import Element, SubElement, tostring
  from xml.parsers.expat import ParserCreate
  from .filebasedimages import FileBasedHeader
label_desc: Use image node_id 2 for calling the XmlParser obj's underlying member method code with example usage: obj._create_parser() and returns: parser