vendredi 18 novembre 2016

TypeError: Error #1085: The element type "opi1" must be terminated by the matching end-tag ""

I'm creating a quiz for the game using Animate CC, all of my questions and answers were taken from XML file. I have 3 categories in the quiz, each of them has 4 questions. 2 of them are working fine, but one has an error. Then I got received this error:

TypeError: Error #1085: The element type "opi1" must be terminated by the matching end-tag "</opi1>".

    at RelationCon/loadXML()[RelationCon::frame10:13]

Here's my code from frame 10:


var questioni: Array = new Array();
var answeri: Array = new Array();
var koreki: Array = new Array();
var loader3: URLLoader = new URLLoader();

loader3.addEventListener(Event.COMPLETE, loadXML);
loader3.load(new URLRequest("relations.xml"));

function loadXML(event: Event): void {
    var myxml3 = new XML(;
    var loopo = myxml3.quesh.length();
    for (var i = 0; i < loopo; i++) {
        questioni[i] = myxml3.quesh[i].qt1;
        answeri[i] = [myxml3.quesh[i].opi1, myxml3.quesh[i].opi2, myxml3.quesh[i].opi3];
        koreki[i] = myxml3.quesh[i].opi1;

Here's from line 13:

var myxml3 = new XML(;

And here's my code from XML file:

<?xml version="1.0" encoding="UTF-8"?>


<qt1>A relation can be represented using a ___________.</qt1> 
<opi1>Directed graph</opi> 
<opi2>Indirected graph</opi2> 
<opi3>Bar graph</opi3>

<qt1>A type of relation on set X is the set {(x, x)|x ? X}.</qt1> 

<qt1>A relation R on a set A called ___ if ?a?A is related to a.</qt1> 

<qt1>A relation R on set A is called ___________ if xRy and yRx implies x = y ?x ? A and ?y ? A.</qt1> 


Both codes seem right, but I don't think why I received this error. Is there something wrong with those codes that I've given? Any help will appreciated. Thanks!

Aucun commentaire:

Enregistrer un commentaire