Reading From XML instead of database? |
[eluser]saidbakr[/eluser]
Hello, I need to know how reading a local, or remote, server xml file and using its data instead of database? For example, Code: <xml> How could I use CI to read this XML file? and what are suitable to do this task, a helper or a plugin? and where could I able to find pre-made such plugins and helpers for CI?
[eluser]saidbakr[/eluser]
Hello I found the solution in XML Library inside the CI Wiki. Everything goes well but I need to add <![CDATA[ ]]> to the text content to disallow parsing of HTML tags inside the text here is an example of the xml: Code: <?xml version="1.0" encoding="UTF-8"?> However, The generated array from the xml parser is not clean enough it needed some modification to get the data in the view file to be something like <?php echo $item['title'][0] ?> and the index [0] should be found inside the loop, i.e there are no 1,2, 3 etc it only 0. Thank you all |
Welcome Guest, Not a member yet? Register Sign In |