hallikpapa has asked for the wisdom of the Perl Monks concerning the following question:
I have this script that runs queries, and outputs it in XML format. Here is a snippet of what comes out if I print to screen:
I am trying to push it back to the browser and I get this error in apache log<?xml version="1.0" encoding="ISO-8859-1"?> <dataset> <cdr> <id>08-15-2007.09 </id> <col2>202</col2> <col3>7</col3> <col4>7</col4> <col5>0</col5> <col6> 0.0</col6> <col7>100</col7> <col8> 1</col8> <col9> </col9> <col10>2007-08-15 09:57:56</col10> </cdr><cdr> <id>08-15-2007.09 </id> <col2>202</col2> <col3>8</col3> <col4>8</col4> <col5>0</col5> <col6>1414.5</col6> <col7>100</col7> <col8> 1</col8> <col9>10608</col9> <col10>2007-08-15 09:57:56</col10> </cdr><cdr> <id>08-15-2007.11 </id> <col2>240</col2> <col3>12</col3> <col4>12</col4> <col5>0</col5> <col6> 0.0</col6> <col7>100</col7> <col8> 2</col8> <col9> </col9> <col10>2007-08-15 11:57:15</col10> </cdr></dataset>
This is how I print the header:malformed header from script. Bad header=<?xml version="1.0" encoding= +": rpt.pl
I got that header from the w3school.com website, so I am a bit confused on what the browser wants. Also, the file I wrote to looks exactly like the above data sample, but much larger, and the browser can't read it.print "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"; print "<dataset>\n"; print @output; print "</dataset>";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: XML::Generator bad header?
by ikegami (Patriarch) on Aug 19, 2007 at 00:26 UTC | |
by hallikpapa (Scribe) on Aug 19, 2007 at 00:47 UTC | |
by Gangabass (Vicar) on Aug 19, 2007 at 01:07 UTC | |
by hallikpapa (Scribe) on Aug 19, 2007 at 01:12 UTC | |
by Anonymous Monk on Aug 19, 2007 at 02:15 UTC | |
| |
by mr_mischief (Monsignor) on Aug 19, 2007 at 20:39 UTC | |
by Anonymous Monk on Aug 21, 2007 at 11:52 UTC | |
by Anonymous Monk on Feb 25, 2009 at 15:58 UTC | |
by Anonymous Monk on Feb 27, 2009 at 14:07 UTC | |
Re: XML::Generator bad header?
by trs80 (Priest) on Aug 19, 2007 at 14:56 UTC |
Back to
Seekers of Perl Wisdom