Re: [PHP] XML parser

2010-07-13 Thread Andrew Ballard
On Tue, Jul 13, 2010 at 10:14 AM, ppps...@gmail.com wrote: > Hello. I have html: > Header > Paragraph 1 > > Paragraph n > > > Header > Paragraph 1 >     > Paragraph n > > > need to parse it like this array: > array( > [0] => array( > 'h3' => 'header' , > 'p' => array( > [0] => 'Paragrap

[PHP] XML parser

2010-07-13 Thread ppps...@gmail.com
Hello. I have html: Header Paragraph 1 Paragraph n Header Paragraph 1 Paragraph n need to parse it like this array: array( [0] => array( 'h3' => 'header' , 'p' => array( [0] => 'Paragraph 1' , [n-1] => 'Paragraph N' ) [1] => array( ['div'] => array ( 'h3' => 'header' , 'p' => arr

Re: [PHP] XML parser error ..

2006-11-21 Thread onewaylife
dear Richard I have written a PHP file in that with help of php document tags i have created XML file in that PHP file and in xml file i have taken care of the tag. with regards rakesh Richard Lynch wrote: > > On Tue, November 21, 2006 2:30 am, onewaylife wrote: >> the file is : - >> >

Re: [PHP] XML Parser set option

2005-12-20 Thread Derek Williams
Amol, Pretty sure that it means the white space after a tag. for example: Joe Dempsey or (even worse, with CR) Joe Dempsey Amol Hatwar wrote: Hi, The PHP Manual entry for xml_parser_set_option lists an option called: XML_OPTION_SKIP_WHITE. I really couldn't decipher what this optio

Re: [PHP] XML Parser set option

2005-12-20 Thread ondrej
Amol Hatwar wrote: Hi, The PHP Manual entry for xml_parser_set_option lists an option called: XML_OPTION_SKIP_WHITE. I really couldn't decipher what this option enables or disables. The manual entry itself is a bit terse: "Whether to skip values consisting of whitespace characters." Doodling a

[PHP] XML Parser set option

2005-12-20 Thread Amol Hatwar
Hi, The PHP Manual entry for xml_parser_set_option lists an option called: XML_OPTION_SKIP_WHITE. I really couldn't decipher what this option enables or disables. The manual entry itself is a bit terse: "Whether to skip values consisting of whitespace characters." Doodling around with it in code

RE: [PHP] XML Parser doesn't work when moved....

2004-11-15 Thread Gryffyn, Trevor
Jay Blanchard [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 10, 2004 4:18 PM > To: Jay Blanchard; [EMAIL PROTECTED] > Subject: RE: [PHP] XML Parser doesn't work when moved > > > [snip] > Having added the following line > > echo "XML Error " . &

RE: [PHP] XML Parser doesn't work when moved....

2004-11-10 Thread Jay Blanchard
[snip] Having added the following line echo "XML Error " . xml_error_string(xml_get_error_code($covadParser)) . "\n"; just after the xml_parse PHP is reporting "not well-formed (invalid token)" so I will have to explore. [/snip] Having beaten my head against the wall for severqal hours now, I am

RE: [PHP] XML Parser doesn't work when moved....

2004-11-10 Thread Jay Blanchard
[snip] /* let's parse! */ if($readXML = fopen(XMLDIR."testRecp.xml", "r")){ while($lineXML = fread($readXML, 4096)){ //echo $lineXML . "\n"; xml_parse($covadParser, $lineXML, feof($readXML)); } } else { echo "COULD NOT READ XML FILE\n"; } /* c

[PHP] XML Parser doesn't work when moved....

2004-11-10 Thread Jay Blanchard
Below is the code that work on a PHP 4.2.1 test server. For some reason it is not working and not throwing errors(set to E_ALL) on 4.3.7 server. Has anyone experienced this kind of error? Or can someone point me in the right direction? TVMIA! /* create a parser */ if(!($covadParser = xml_parser_cr

[PHP] XML parser for PHP5

2004-09-15 Thread Matthew Sims
Anyone know any good XML parsers that work with PHP5? Most of what I can find on freshmeat are still using PHP4 classes and Google isn't turning up much either. -- --Matthew Sims -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

Re: [PHP] XML Parser Functions - problem interpreting an xml file

2004-04-12 Thread Kai Hackemesser
This didn't help, since the problem is in an file which doesn't pass the PHP interpreter. Next idea? Regards, Kai "Chris Boget" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > > I send you a part of the XML file (- content), maybe you can tell me why > > it cant be interpreted

Re: [PHP] XML Parser Functions - problem interpreting an xml file

2004-04-12 Thread Chris Boget
> I send you a part of the XML file (- content), maybe you can tell me why it > cant be interpreted. It looks like it doesn't like the http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] XML Parser Functions - problem interpreting an xml file

2004-04-12 Thread Kai Hackemesser
Hello, I have created my own handler following the examples in the manual. It works fine for XML files I created for myself. Now I tried one file given by someone else, but I get as result always following error: "junk after document element" in line 1, column 0. I send you a part of the XML file

Re: [PHP] xml parser und bestehende variablen - multilinguale app

2003-11-23 Thread Evan Nemerson
How are you parsing the XML? If you read the values into a PHP variable, and you're confident in the contents of the string, you could use eval()... Also, preg_replace_callback() may be useful. If you provide a bit more example, it may be more easy to help. In any case, I think your variable va

[PHP] xml parser und bestehende variablen - multilinguale app

2003-11-23 Thread Merlin
Hallo zusammen, ich möchte gerne meine bestehende app in mehreren Sprachen anbieten. Dazu habe ich mir ein xml parser package installiert welches in der Lage ist aus xml dateien inhalte einzufügen. Zum Bsp sieht das xml file so aus: example beispiel Das funktioniert so weit. Das PROBLEM allerdi

Re: [PHP] XML Parser

2003-10-24 Thread Scott Fletcher
Thanks! Oh Boy! :-) For the repeating of the same XML name tag, I guess one way to do it is to depend on the higher up XML name tag that group them together. Chopped them off and use it somehow. For ex. --snip-- *** *** --snip-- This may help Now I'm going to have to decide on DOM

Re: [PHP] XML Parser

2003-10-24 Thread Ray Hunter
I would probably make this a new thread since it is a new question. Anyways, the answer to your question is no, unless you make that happen. When you use the xml parser in php you are using a expat parser (stream-oriented parser) that you set up (register) handlers for. So when the parser encoun

Re: [PHP] XML Parser misbehaves with &

2003-08-19 Thread [EMAIL PROTECTED]
Timo Boettcher wrote: Hi Jeff, Nachricht vom Montag, 18. August 2003, 18:14:37: I've come across this frustrating behavior with the XML parser when it reads an escaped ampersand (&) If the xml being evaluated is: Blue, Green & Red "The ampersand character (&) and the left angle br

Re: [PHP] XML Parser misbehaves with &

2003-08-19 Thread Timo Boettcher
Hi Jeff, Nachricht vom Montag, 18. August 2003, 18:14:37: > I've come across this frustrating behavior with the XML parser when it > reads an escaped ampersand (&) > If the xml being evaluated is: Blue, Green & Red > it calls the character data handler 3 times: > the first time the $data is

Re: [PHP] XML Parser misbehaves with &

2003-08-18 Thread raditha dissanayake
Hello, It's not misbehaving and it's not illegal xml. It's a well documented fact that the character data function may be called more than once. The normal programming practice is to put the strings that are given to you at each call into a buffer. Then you write code in the end handler to pro

Re: [PHP] XML Parser misbehaves with &

2003-08-18 Thread Jeff Bearer
The data contains escaped ampersands -> & Which is as far as I know the way one represents ampersands in their data. In my post below, the value of $data the second time is "&" because it has been evaluated by the xml parser. And btw xmllint has no problems with & On Mon, 2003-08-18 at 12:41,

Re: [PHP] XML Parser misbehaves with &

2003-08-18 Thread Justin Farnsworth
This is normal. You have illegal XML there, as it should be in . I have run across this, and have to clean it up with an awk script. Ampersand is a no-no. Just running xmllint on the file will tell you about the problem(s). _justin Jeff Bearer wrote: > > I've come across this frustrating beh

[PHP] XML Parser misbehaves with &

2003-08-18 Thread Jeff Bearer
I've come across this frustrating behavior with the XML parser when it reads an escaped ampersand (&) If the xml being evaluated is: Blue, Green & Red it calls the character data handler 3 times: the first time the $data is "Blue, Green " the second time is "&" and the third time is " Red" Ne

Re: [PHP] XML Parser Problem

2003-06-07 Thread Dustin Pate
Thank you. I checked my php_info() and sure enough --disable_xml is present. Are there any Gentoo Users out there having this problem as well? Any Gentoo Users out there that might be able to help me work out a solution? I have 'xml' and 'xml2' in my make.conf use flags. D > On Sun, 8 Jun 2003,

Re: [PHP] XML Parser Problem

2003-06-07 Thread Philip Olson
On Sun, 8 Jun 2003, Dustin Pate wrote: > Fatal error: Call to undefined function: xml_parser_create() in > /home/httpd/rootdir/sstats/includes/XPath.class.php on line 1410 > > I now get this error on my phpsysinfo page. I have changed nothing in my > install except for updating recently. My Lin

[PHP] XML Parser Problem

2003-06-07 Thread Dustin Pate
Fatal error: Call to undefined function: xml_parser_create() in /home/httpd/rootdir/sstats/includes/XPath.class.php on line 1410 I now get this error on my phpsysinfo page. I have changed nothing in my install except for updating recently. My Linux Flavor is Gentoo if that helps. If you need fu

[PHP] xml parser breaking on legal xml chars

2002-11-01 Thread Gerard Samuel
Im some what new to xml but I've put together a basic xml parsing script, and for some reason, on data like -> It's been a few days since... the parser thinks its 3 lines. Its parsing a new line on htmlentities like ' So with the above line the looped output is like -> Data --> It Data --> ' Da

Re: [PHP] XML Parser additional

2002-10-01 Thread Justin French
You want to retain ownership, AND take contributions? Generally it'd be an either/or proposition wouldn't it? Justin French on 02/10/02 2:26 PM, Khalid El-Kary ([EMAIL PROTECTED]) wrote: > hi, > i wanted to add something, i want to receive contribtions from developers as > well to make the pa

[PHP] XML Parser additional

2002-10-01 Thread Khalid El-Kary
hi, i wanted to add something, i want to receive contribtions from developers as well to make the parser be better _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www

[PHP] XML Parser

2002-10-01 Thread Khalid El-Kary
hi, i have developped an XML parser that's easy to use and very fast, and i have run two websites using it. http://creaturesx.ma.cx http://creaturesx.ma.cx/osman/jokes/index.php (not complete website) the question comes now what's best way to contribute this parser to the PHP community without

Re: [PHP] XML Parser Question

2002-09-11 Thread OrangeHairedBoy
Hmmm...hadn't thought of that... I guess I could use that if there's no alternative... What I really need is the ability to do this: I'm convinced that there just has to be a way! :) But thanks though...I'm writing that down now... Lewis "Peter J. Schoenster" <[EMAIL PROTECTED]> wrote in

Re: [PHP] XML Parser Question

2002-09-11 Thread Peter J. Schoenster
On 12 Sep 2002 at 0:13, OrangeHairedBoy wrote: > Yeah...i should have mentioned I had thought of that...but I really > don't want to :) > > It just doesn't look right when it's a math expression. Know a permenant > solution? > I want to be able to handle the tag , but the parser > keeps tel

Re: [PHP] XML Parser Question

2002-09-11 Thread OrangeHairedBoy
[EMAIL PROTECTED]... > could you change the "<" to "<" or "%3C" or something similar? > > -Original Message- > From: OrangeHairedBoy [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 1:59 PM > To: [EMAIL PROTECTED] > Su

RE: [PHP] XML Parser Question

2002-09-11 Thread Martin Towell
could you change the "<" to "<" or "%3C" or something similar? -Original Message- From: OrangeHairedBoy [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 1:59 PM To: [EMAIL PROTECTED] Subject: [PHP] XML Parser Question I've been re

[PHP] XML Parser Question

2002-09-11 Thread OrangeHairedBoy
I've been reading the XML parser documention, and I'm not having much luck. I want to be able to handle the tag , but the parser keeps telling me that it's not formed correctly (because of the "<" in the quotes). But shouldn't it ignore that as a tag-opening "<" since it's inside quotes?? Anyway,

[PHP] XML parser vs objects

2002-05-21 Thread Mirek Novak
Hi, is it possible to use methods of a class as a handlers in xml_set_element_handler(...)? How it can be done? TIA, M.N. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] XML-parser

2002-05-13 Thread Analysis & Solutions
On Mon, May 13, 2002 at 02:00:49PM +0200, [EMAIL PROTECTED] wrote: > > Has anybody a good link to a tut or something else.. http://www.analysisandsolutions.com/code/phpxml.htm -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution

[PHP] XML-parser

2002-05-13 Thread marcos1
Hello, I´m working on a little web shop solution for a school project, therefore I´m looking for a PHP XML-Parser or some source code I can get from somewhere. Has anybody a good link to a tut or something else.. -- Thanks in advance for your help, kind regards Marcos GMX - Die

[PHP] XML parser questions

2002-03-15 Thread Thalis A. Kalfigopoulos
OK, I'm getting a bit confused about the well-formedness checking of expat. Doesn't expat do basic well-formedness checking? If I set empty start/endElement and charData handlers, and I parse: text I get an error as expected about mismatched tags. But if I give: text Or: text It doesn'

Re: [PHP] XML Parser is a bit strict

2001-01-18 Thread Francois Beauregard
At 11:52 01-01-19 +1100, Brian White wrote: >As far as I understand XHMTL, it simply HTML made XML compliant, which >basically means you always have to put in an end tag. True enough... There is a tool though on the w3c call HTMLTidy that you can pass your HTML code through and will give you bac

Re: [PHP] XML Parser is a bit strict

2001-01-18 Thread Brian White
( I am still not used to this mailing list - I keep hiting "Reply" and only sending it to the poster. ) Part of the XML standard is that every element will have start and end tags. HTML actually uses the syntax of SGML, which allows some tags to have their end tags omitted - therefore, on som

Re: [PHP] XML Parser is a bit strict

2001-01-18 Thread Chris Adams
On 18 Jan 2001 14:28:16 -0800, Chris Lee <[EMAIL PROTECTED]> wrote: >I dont know if you can use XHTML syntax in XML, I dont think it works like >this, I think XML is more strict. XHTML *is* XML - it's just HTML reformulated so that a valid XHTML document can be parsed by a normal XML parser witho

RE: [PHP] XML Parser is a bit strict

2001-01-18 Thread Mike Heath
]] Sent: Thursday, January 18, 2001 10:10 AM To: [EMAIL PROTECTED] Subject: [PHP] XML Parser is a bit strict I am using php 4.02 and Apache 1.3.12 and am trying to do some XML parsing. HTML is also in the text I'm parsing and the xml parsing dies if it sees an html tag that does not have a mat

Re: [PHP] XML Parser is a bit strict

2001-01-18 Thread Chris Lee
I dont know if there is a work around for this, but Im under the understanding that XML has to (not an option) have a closing tag on everything. I know in XHTML they have exeptions, but its slacker. ie. invalid valid or I dont know if you can use XHTML syntax in XML, I dont think it works li

[PHP] XML Parser is a bit strict

2001-01-18 Thread Butler, Shaun
I am using php 4.02 and Apache 1.3.12 and am trying to do some XML parsing. HTML is also in the text I'm parsing and the xml parsing dies if it sees an html tag that does not have a matching closing tag. Is there any work around to this and if so is there a way to make it so XML tags don't n

[PHP] XML, Parser and newbie links

2001-01-16 Thread Robert Mena
Hi, recently I was given the task to create an application to generate xml files in order to exchange data. Since my knowleadge of xml is close to zero :) I also received an english text explaining the DTD and an example of how the file should be written. So I got to a point where I simply shoul