Welcome Guest, Not a member yet? Register   Sign In
poor formatted XML problem
#1

[eluser]bennr[/eluser]
I have created a model which generates all my xml content from mysql

all works except the $this->dbutil->xml_from_result

function creates poor formatted xml

e.g

Code:
<root>
       <element>
        <id></id>
        &lt;title&gt;&lt;/title>
        <desc></desc>
        <sub_title></sub_title>
        <image></image>
        <thumb></thumb>
        &lt;link&gt;&lt;/link>
    </element>
<root>

its not closing the tag correctly

this is the formatting which is suggested by the user guide

Code:
$config = array (
    'root'    => 'root',
    'element' => 'element',
    'newline' => "\n",
    'tab'    => "\t"
);

does anyone know how I can fix this issue

im using ci 1.7.1
#2

[eluser]bennr[/eluser]
anyone? I have still not found a solution to this
#3

[eluser]bennr[/eluser]
Aghhhhhhhhhhhhhhh
#4

[eluser]bennr[/eluser]
I know where the problem is now,

for those who need to know (because I'm nice like that)

in system/database/DB_utility.php

under xml_from_result function

here is where the closing tag is missing

so line 253

Code:
$xml .= "</$root>".$newline;

instead of

Code:
$xml .= "<$root>".$newline;

thanks for all your help only took me 4 days to work out as a nube.




Theme © iAndrew 2016 - Forum software by © MyBB