[eluser]Unknown[/eluser]
Hello. I'm new here and I am stuck at something.. Also sorry for my bad english. I would like to know if I can do it with CI or i need something else for this.
I would like to use a xml database for the last project at faculty and I would like to know if the ci xml library can help me..because i didnt find information that can help at what I want to do. If I have :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<question id="1" type="eassy">
<content>What is our favorite color ?</content>
<possible_answer nr="1">blue</possible_answer>
<possible_answer nr="2">red</possible_answer>
<possible_answer nr="3">green</possible_answer>
<right_answer>red</right_answer>
</question>
<question id="2" type="hard">
<content>What is the last name of the indian prime minister ?</content>
<possible_answer nr="1">Adrian</possible_answer>
<possible_answer nr="2">Singh</possible_answer>
<possible_answer nr="3">Basescu</possible_answer>
<possible_answer nr="4">Jennisse</possible_answer>
<right_answer>Singh</right_answer>
</question>
</root>
I would like to know, if i can interrogate the xml and show to user screen, for a type, one question. After the user hit the "Next Button", another one from xml will show to the screen with the specific type of question. If I can't do it with using ci library, what can I use in my code igniter project ?? Also, i want to append/save to an already existent xml, the answers of the user, like:
Code:
<users>
<user name="Sam">
<question id="1">green</question>
<question id="2">Singh</question>
</user>
<user name="Gabi">
<question id="1">blue</question>
<question id="2">Singh</question>
</user>
</users>
I tought at ci templates to use. But I dont know how to integrate ci library with that data base xml. Thank you so much for reply. Hope I wrote it in the correspondent topic.