class_docstr: Subclass for formatting data in XML.
  
  Parameters
  ----------
  path_or_buffer : str or file-like
      This can be either a string of raw XML, a valid URL,
      file or file-like object.
  
  index : bool
      Whether to include index in xml document.
  
  row_name : str
      Name for root of xml document. Default is 'data'.
  
  root_name : str
      Name for row elements of xml document. Default is 'row'.
  
  na_rep : str
      Missing data representation.
  
  attrs_cols : list
      List of columns to write as attributes in row element.
  
  elem_cols : list
      List of columns to write as children in row element.
  
  namespaces : dict
      The namespaces to define in XML document as dicts with key
      being namespace and value the URI.
  
  prefix : str
      The prefix for each element in XML document including root.
  
  encoding : str
      Encoding of xml object or document.
  
  xml_declaration : bool
      Whether to include xml declaration at top line item in xml.
  
  pretty_print : bool
      Whether to write xml document with line breaks and indentation.
  
  stylesheet : str or file-like
      A URL, file, file-like object, or a raw string containing XSLT.
  
  {compression_options}
  
      .. versionchanged:: 1.4.0 Zstandard support.
  
  {storage_options}
  
  See also
  --------
  pandas.io.formats.xml.EtreeXMLFormatter
  pandas.io.formats.xml.LxmlXMLFormatter
docstr: Validate elems_cols and attrs_cols.
  
  This method will check if columns is list-like.
  
  Raises
  ------
  ValueError
      * If value is not a list and less then length of nodes.
docstr_tok: ["Validate","elems_cols","and","attrs_cols",".","This","method","will","check","if","columns","is","list-like",".","Raises","--","--","--","ValueError","*","If","value","is","not","a","list","and","less","then","length","of","nodes","."]
code: def validate_columns(self) -> None:
      """
      Validate elems_cols and attrs_cols.
  
      This method will check if columns is list-like.
  
      Raises
      ------
      ValueError
          * If value is not a list and less then length of nodes.
      """
      if self.attr_cols and not is_list_like(self.attr_cols):
          raise TypeError(
              f"{type(self.attr_cols).__name__} is not a valid type for attr_cols"
          )
  
      if self.elem_cols and not is_list_like(self.elem_cols):
          raise TypeError(
              f"{type(self.elem_cols).__name__} is not a valid type for elem_cols"
          )
  
imports: from __future__ import annotations
  import codecs
  import io
  from typing import TYPE_CHECKING, Any
  from pandas._typing import CompressionOptions, FilePath, ReadBuffer, StorageOptions, WriteBuffer
  from pandas.errors import AbstractMethodError
  from pandas.util._decorators import doc
  from pandas.core.dtypes.common import is_list_like
  from pandas.core.dtypes.missing import isna
  from pandas.core.shared_docs import _shared_docs
  from pandas.io.common import get_handle
  from pandas.io.xml import get_data_from_filepath, preprocess_data
label_desc: Use image node_id 3 for calling the BaseXMLFormatter obj's underlying member method code with example usage: obj.validate_columns() without return types