RE: [PHP] XML + PHP is going to eat my shorts [SOLVED]

2004-11-16 Thread Burhan Khalid
On Tue, 2004-11-16 at 09:50 -0600, Jay Blanchard wrote: > [snip] > > > [/snip] > > using fread the above line comae out like this(even though I was not > echoing the line, just processing) > > > > ...as soon as I added stripslashes the syntax error disappeared and > VIOLA!...xml file pa

RE: [PHP] XML + PHP is going to eat my shorts

2004-11-16 Thread Burhan Khalid
On Tue, 2004-11-16 at 09:01 -0600, Jay Blanchard wrote: > [snip] > xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); > xml_parser_set_option($this->parser, XML_OPTION_SKIP_WHITE, 1); > [/snip] > > I had those in there as well...here is the first few liners of the XML > source >

RE: [PHP] XML + PHP is going to eat my shorts

2004-11-16 Thread Burhan Khalid
On Tue, 2004-11-16 at 08:51 -0600, Jay Blanchard wrote: > [snip] > > > > > > ... it throws an error from xml_get_error_code > > Trim your xml file. Whitespace can cause this problem. > [/snip] > > I trimmed and chopped to no avail. Argh. Try this snippet which has worked for me in the past.

Re: [PHP] XML + PHP is going to eat my shorts [SOLVED]

2004-11-16 Thread Marek Kilimajer
Jay Blanchard wrote: [snip] [/snip] using fread the above line comae out like this(even though I was not echoing the line, just processing) ...as soon as I added stripslashes the syntax error disappeared and VIOLA!...xml file parsing at its finest! magic_quotes_runtime enabled? what about

Re[2]: [PHP] XML + PHP is going to eat my shorts

2004-11-16 Thread Richard Davey
Hello Jay, Tuesday, November 16, 2004, 3:01:45 PM, you wrote: JB> I had those in there as well...here is the first few liners of the XML JB> source Does the XML file validate? Maybe post a complete file (or if too long a URL to one) so we could test it? Would at least narrow down if the erro

RE: [PHP] XML + PHP is going to eat my shorts [SOLVED]

2004-11-16 Thread Jay Blanchard
[snip] > [/snip] using fread the above line comae out like this(even though I was not echoing the line, just processing) ...as soon as I added stripslashes the syntax error disappeared and VIOLA!...xml file parsing at its finest! Thanks to all that helped -- PHP General Mailing Li

RE: [PHP] XML + PHP is going to eat my shorts

2004-11-16 Thread Jay Blanchard
[snip] xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($this->parser, XML_OPTION_SKIP_WHITE, 1); [/snip] I had those in there as well...here is the first few liners of the XML source http://the.api.server/dtd/response.dtd"; > co

RE: [PHP] XML + PHP is going to eat my shorts

2004-11-16 Thread Jay Blanchard
[snip] > > > ... it throws an error from xml_get_error_code Trim your xml file. Whitespace can cause this problem. [/snip] I trimmed and chopped to no avail. Argh. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] XML + PHP is going to eat my shorts

2004-11-16 Thread Richard Davey
Hello Jay, Tuesday, November 16, 2004, 2:13:28 PM, you wrote: JB> And when the pareser hits the first line of the XML file ... JB> JB> ... it throws an error from xml_get_error_code JB> "syntax error" Hard to tell without seeing the XML source, but could it be a case of whitespace and/or case-f

Re: [PHP] XML + PHP is going to eat my shorts

2004-11-16 Thread Jason Wong
On Tuesday 16 November 2004 22:13, Jay Blanchard wrote: > I have done ini_set("short_open_tag", 0); It's probably not settable at runtime. Check manual. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet

Re: [PHP] XML + PHP is going to eat my shorts

2004-11-16 Thread Burhan Khalid
On Tue, 2004-11-16 at 08:13 -0600, Jay Blanchard wrote: > Okie dokieI have to parse an XML file and I continue to RTFM, STFW, > and STFA. So I do this... > > /* let's parse! */ > if($readXML = fopen(XMLDIR."testRecp.xml", "r")){ > while($lineXML = fread($readXML, 4096)){ >

[PHP] XML + PHP is going to eat my shorts

2004-11-16 Thread Jay Blanchard
Okie dokieI have to parse an XML file and I continue to RTFM, STFW, and STFA. So I do this... /* let's parse! */ if($readXML = fopen(XMLDIR."testRecp.xml", "r")){ while($lineXML = fread($readXML, 4096)){ xml_parse($covadParser, $lineXML, feof($readXML));