0

I have a issue when i read a xml File with jquery. This is my call to find the xml and the section. It works untill here

 $.ajax({
    type: 'GET',
    url:"../quiz.xml",
    dataType: "xml"}).always(function(xml) {

    // level in xml finden und anschließend question in level finden  
    var level = $(xml).find("level"+ sessionStorage.getItem('level'));
var question = $(level).find("question");
var frage = $(question[number]).find('frage');

$('.questions').html(frage);

This is what stand in the xml file. The problem is that it output as sting and not as html-Tag. Did i forot something?

<frage>
Was sind <![CDATA[ < br />]]>  Versalien?
</frage>
3
  • Refer this : stackoverflow.com/questions/10223865/ajax-jquery-xml-parse Commented Aug 29, 2013 at 12:31
  • the problem is the output. That he the <br /> is as string there and not as html tag Commented Aug 29, 2013 at 12:33
  • If it's literally < br />, then there is something wrong with the markup (the space between < and br). You'd have to fix that manually. Commented Aug 29, 2013 at 12:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.