我在 txt 文件中有 5000 个问题,如下所示:
<quiz>
<que>The question her</que>
<ca>text</ca>
<ia>text</ia>
<ia>text</ia>
<ia>text</ia>
</quiz>
Run Code Online (Sandbox Code Playgroud)
我想在 Ubuntu 中编写一个脚本来转换所有问题,如下所示:
{
"text":"The question her",
"answer1":"text",
"answer2":"text",
"answer3":"text",
"answer4":"text"
},
Run Code Online (Sandbox Code Playgroud)