The xq tool from https://kislyuk.github.io/yq/ turns your XML into
{
  "quiz": {
    "que": "The question her",
    "ca": "text",
    "ia": [
      "text",
      "text",
      "text"
    ]
  }
}
by just using the identity filter (xq . file.xml).
We can massage this into something closer the form you want using
xq '.quiz | { text: .que, answers: .ia }' file.xml
which outputs
{
  "text": "The question her",
  "answers": [
    "text",
    "text",
    "text"
  ]
}
To fix up the answers bit so that you get your enumerated keys:
xq '.quiz |
    { text: .que } +
    (
        [
            range(.ia|length) as $i | { key: "answer\($i+1)", value: .ia[$i] }
        ] | from_entries
    )' file.xml
This adds the enumerated answer keys with the values from the ia nodes by iterating over the ia nodes and manually producing a set of keys and values.  These are then turned into real key-value pairs using from_entries and added to the proto-object we've created ({ text: .que }).
The output:
{
  "text": "The question her",
  "answer1": "text",
  "answer2": "text",
  "answer3": "text"
}
If your XML document contains multiple quiz nodes under some root node, then change .quiz in the jq expression above to .[].quiz[] to transform each of them, and you may want to put the resulting objects into an array:
xq '.[].quiz[] |
    [ { text: .que } +
    (
        [
            range(.ia|length) as $i | { key: "answer\($i+1)", value: .ia[$i] }
        ] | from_entries
    ) ]' file.xml
 
                