Convert "on"/"off" values into 1 and 0

Hi all,

I am grabbing data from an xml url and a few variables are not displayed in a number format but as “on” “off” (or “Aus” / “Ein” in German). is there a way to directly read the data in as 0 and 1?

Many thanks!

[[outputs.influxdb_v2]]

  urls = ["http://192.168.XX.XX:8086"]

  ## Token for authentication.
  token = "XXX"

  ## Organization is the name of the organization you wish to write to; must exist.
  organization = "XX"

  ## Destination bucket to write into.
  bucket = "BAYROL"

  tagexclude =["tag2"]
  [outputs.influxdb_v2.tagpass]
	tag2 = ["BAYROL"]


[[inputs.http]]
  urls = ["http://192.168.XX.XX/cgi-bin/webgui.fcgi?xmlitem=35.6028"]
  data_format = "xml"

  ## Multiple parsing sections are allowed

  [[inputs.http.xpath]]
    metric_selection = "/pm5"

    [inputs.http.xpath.tags]
      id = "id/@name"

    [inputs.http.xpath.fields]
      type = "number(/item/@type)"
      label = "string(/item/@label)"
      unit = "string(/item/@unit)"
      value = "number(/item/@value)"
	
  [inputs.http.tags]
	tag2 = "BAYROL"

processor enum should do the trick