class_docstr: Initialise a PomdpXWriter Object
  
  Parameters
  ----------
      model: A Bayesian of Markov Model
          The model to write
  
  encoding: String(optional)
      Encoding for text data
  
  prettyprint: Bool(optional)
      Indentation in output XML if true
class_docstr_tok: ["Initialise","a","PomdpXWriter","Object","Parameters","--","--","--","--","--","model",":","A","Bayesian","of","Markov","Model","The","model","to","write","encoding",":","String","(","optional",")","Encoding","for","text","data","prettyprint",":","Bool","(","optional",")","Indentation","in","output","XML","if","true"]
docstr: supports adding variables to the xml
  
  Parameters
  ---------------
  var: The SubElement variable
  tag: The SubElement tag to which enum value is to be added
  
  Return
  ---------------
  None
docstr_tok: ["supports","adding","variables","to","the","xml","Parameters","--","--","--","--","--","--","--","-","var",":","The","SubElement","variable","tag",":","The","SubElement","tag","to","which","enum","value","is","to","be","added","Return","--","--","--","--","--","--","--","-","None"]
code: def _add_value_enum(self, var, tag):
      """
      supports adding variables to the xml
  
      Parameters
      ---------------
      var: The SubElement variable
      tag: The SubElement tag to which enum value is to be added
  
      Return
      ---------------
      None
      """
      if var["ValueEnum"][0] == "s0":
          numvalues_tag = etree.SubElement(tag, "NumValues")
          numvalues_tag.text = str(int(var["ValueEnum"][-1][-1]) + 1)
      else:
          valueenum_tag = etree.SubElement(tag, "ValueEnum")
          valueenum_tag.text = ""
          for value in var["ValueEnum"]:
              valueenum_tag.text += value + " "
          valueenum_tag.text = valueenum_tag.text[:-1]
  
imports: import xml.etree.ElementTree
  from collections import defaultdict
label_desc: Use image node_id 4 for calling the PomdpXWriter obj's underlying member method code with example usage: obj._add_value_enum(var, tag) without return types