Bonjour, j'aurai besoin d'un coup de main, j'ai des fichiers xml qui proviennent d'un logiciel de QCM, le problème c'est qu'on veut plus l'utiliser car il est propriétaire, on souhaite utiliser un open source, malheureusement j'ai essayer d'importer ce fichier sur le nouveau LMS mais cela ne fonctionne, les balise XML sont différents entre ces 2 applications.

Mon idée est d'extraire les données de l'ancienne application, et les rechargés dans le nouveau format.

voici un aperçu d'un fichier QML de l'ancienne application

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
<?xml version="1.0" standalone="no"?>
<!DOCTYPE QML SYSTEM "QML_V3.dtd">
 
<QML>
 
<QUESTION ID="7815466317071926" DESCRIPTION="007-infos suffisantes" TOPIC="QUESTIONS-TEST\lchabanne" STATUS="Normal">
  <CONTENT TYPE="text/html"><![CDATA[Etes-vous suffisamment informés de ce qui se passe dans le Département ? Des actions en cours ?]]></CONTENT>
  <ANSWER QTYPE="YN" SUBTYPE="VERT">
    <CHOICE ID="0">
      <CONTENT TYPE="text/html"><![CDATA[Oui]]></CONTENT>
    </CHOICE>
    <CHOICE ID="1">
      <CONTENT TYPE="text/html"><![CDATA[Non]]></CONTENT>
    </CHOICE>
  </ANSWER>
  <OUTCOME ID="0 Oui" SCORE="0">
    <CONDITION>"0"</CONDITION>
    <CONTENT TYPE="text/html"><![CDATA[]]></CONTENT>
  </OUTCOME>
  <OUTCOME ID="1 Non" SCORE="0">
    <CONDITION>"1"</CONDITION>
    <CONTENT TYPE="text/html"><![CDATA[]]></CONTENT>
  </OUTCOME>
</QUESTION>
 
</QML>
et voici le nouveau format de la nouvelle application
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
 
<?xml version="1.0" encoding="UTF-8"?>
<quiz>
<!-- question: 0  -->
  <question type="category">
    <category>
        <text>$course$/Défaut pour physique6e</text>
 
    </category>
  </question>
 
<!-- question: 2  -->
  <question type="multichoice">
    <name>
      <text>xml</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p>Le xml est une  recette</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>je suis le vide back</p>]]></text>
    </generalfeedback>
    <defaultgrade>1.0000000</defaultgrade>
    <penalty>1.0000000</penalty>
    <hidden>0</hidden>
    <single>true</single>
    <shuffleanswers>true</shuffleanswers>
    <answernumbering>abc</answernumbering>
    <correctfeedback format="html">
      <text><![CDATA[<p>1</p>]]></text>
    </correctfeedback>
    <partiallycorrectfeedback format="html">
      <text><![CDATA[<p>2</p>]]></text>
    </partiallycorrectfeedback>
    <incorrectfeedback format="html">
      <text><![CDATA[<p>3</p>]]></text>
    </incorrectfeedback>
    <answer fraction="100" format="html">
      <text><![CDATA[<p>notes</p>]]></text>
      <feedback format="html">
        <text><![CDATA[<p>vraix</p>]]></text>
      </feedback>
    </answer>
    <answer fraction="0" format="html">
      <text><![CDATA[<p>faux4</p>]]></text>
      <feedback format="html">
        <text><![CDATA[<p>faux5</p>]]></text>
      </feedback>
    </answer>
    <answer fraction="0" format="html">
      <text><![CDATA[<p>faux5</p>]]></text>
      <feedback format="html">
        <text></text>
      </feedback>
    </answer>
  </question>
 
<!-- question: 1  -->
  <question type="truefalse">
    <name>
      <text>oxygene</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p>Quel est la forumule de l'oxygène?</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text></text>
    </generalfeedback>
    <defaultgrade>1.0000000</defaultgrade>
    <penalty>1.0000000</penalty>
    <hidden>0</hidden>
    <answer fraction="0" format="moodle_auto_format">
      <text>true</text>
      <feedback format="html">
        <text><![CDATA[<p>02</p>]]></text>
      </feedback>
    </answer>
    <answer fraction="100" format="moodle_auto_format">
      <text>false</text>
      <feedback format="html">
        <text></text>
      </feedback>
    </answer>
  </question>
 
</quiz>
Que pensez-vous de démarche, j'espère être dans la bonne catégorie, je suppose qu'il faut passer par des regex ?
je vous remercie de votre réponse