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] => 'Paragraph 1' ,
> [n-1] => 'Paragraph N'
> )
> [1] => array(
> ['div'] => array (
> 'h3' => 'header' ,
> 'p' => array(
> [0] => 'Paragraph 1' ,
> [n-1] => 'Paragraph N'
> )
> ) ;
>
> maybe simple other. Which pear class i can use for this task ?
>
>
>

Why PEAR? That looks almost exactly like SimpleXML.

Andrew

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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' => array(
[0] => 'Paragraph 1' ,
[n-1] => 'Paragraph N'
)
) ;

maybe simple other. Which pear class i can use for this task ?




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 : -
>> 
> 
>> it give this output " XML parser error: Reserved XML Name"
> 
> One Possible Interpretation:
> 
> XML files start with:
>  
> Your file does not start with:
>  
> Your file is not XML.
> 
> Fix it.
> 
> -- 
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some starving artist.
> http://cdbaby.com/browse/from/lynch
> Yeah, I get a buck. So?
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/XML-parser-error-..-tf2677513.html#a7485238
Sent from the PHP - General mailing list archive at Nabble.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 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 got me no luck. Any ideas on what kind
of whitespaces it does supress?

Regards,

ah

  


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 around with it in code got me no luck. Any ideas on what kind
of whitespaces it does supress?


Look at this script:

\n\t";

$p = xml_parser_create();

xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, $argv[1]);
xml_parse_into_struct($p, $simple, $vals);

xml_parser_free($p);
echo "\nVals array\n";
print_r($vals);
?>

// sets XML_OPTION_SKIP_WHITE to false
[EMAIL PROTECTED] ~/tmp $ php simple.php 0
Array
(
[0] => Array
(
[tag] => ROOT
[type] => complete
[level] => 1
[value] =>

)

)

// sets XML_OPTION_SKIP_WHITE to 1
[EMAIL PROTECTED] ~/tmp $ php simple.php 1
Array
(
[0] => Array
(
[tag] => ROOT
[type] => complete
[level] => 1
)

)

With XML_OPTION_SKIP_WHITE = 1 sets are whitespace chars discarded from 
the result. In first output is index 'value' which contains only "\n\t" 
- whitespace chars. Second output is without this index in array - 
whitespace chars are ignored.


If you have node which contains text and whitespace chars " some 
text" then whitespace chars are not discarded. Only content of 
nodes with whitespace chars only are discarded (-> 
).



--
Ondrej Ivanic
([EMAIL PROTECTED])

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 got me no luck. Any ideas on what kind
of whitespaces it does supress?

Regards,

ah

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2004-11-15 Thread Gryffyn, Trevor
Using PHP 4.2.1 as a development platform to run on a 4.3.7 production
box?  How strange. Haha  Assuming you have zero control over this
(otherwise, UPGRADE or something :) then I'm not sure what to tell you.

Here are some articles you may have seen already, but passing them on
anyway:


"Parsing non-well-formed XML documents in PHP 5.1"
http://blog.bitflux.ch/archive/parsing_non_well_formed_xml_documents_in_
php.html

"Parsing RSS at all costs"  (some general ideas, not necessarily PHP
oriented)
http://www.xml.com/pub/a/2003/01/22/dive-into-xml.html

Random comments at PHP Manual:
http://ar.php.net/manual/en/ref.xml.php

Random info from Zend:
http://www.zend.com/zend/art/parsing.php


"need help with Sablotron parser error"
http://www.webmasterworld.com/forum88/2491.htm



You also might try to pre-qualify/validate the XML and if it doesn't
pass the "well-formed" test, to put it aside and notify you of a
problem.  Here's info on 'well-formedness':
http://www.developer.com/lang/print.php/784621
http://www.phpfreaks.com/xmlmanual.php


Hope this helps a little.

-TG


> -Original Message-
> From: 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 " . 
> 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
> thouroughly stumped and have a major headache. I have turned 
> over all of
> the rocks that I can and cannot even come up with a clean 
> explanation of
> the error itself. Does anyone have anything that can help me 
> clean this
> up? Unfortunately I have no control over the XML as it is a received
> document that I am trying to parse.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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
thouroughly stumped and have a major headache. I have turned over all of
the rocks that I can and cannot even come up with a clean explanation of
the error itself. Does anyone have anything that can help me clean this
up? Unfortunately I have no control over the XML as it is a received
document that I am trying to parse.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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";
}
/* clear the parser */
xml_parser_free($covadParser);
[/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. Seems that one server is not as
strict as the other. Is there a way to reduced strictness of xml
validation?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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_create())){
echo "Failed to create parser\n";
exit();
}
/* set handlers for parser */
xml_set_element_handler($covadParser, "StartTag", "EndTag");
xml_set_character_data_handler($covadParser, "DataHandler");
/* 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";
}
/* clear the parser */
xml_parser_free($covadParser);

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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.net/unsub.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. It looks like it doesn't like the 
> Do you have short tags enabled?  If so, you might want to disable them.
> Just to test this theory, try to add the following at the top of your
script and
> see if the problem doesn't go away:
>
> ini_set( short_open_tag, '
> or something along those lines (anything other than  you may want to recompile with "--disable-short-tags".
>
> Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 (- content), maybe you can tell me why it
cant be interpreted. It looks like it doesn't like the 




http://www.x.net";>
News
x
-red-
12.04.2004 16:14:00
x









-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 variables are a bit out of whack. Read 
http://us3.php.net/manual/en/language.variables.variable.php

That may be your problem if it's outputting something like 'beispiel ', and 
not 'beispiel $no'. Try doing error_reporting(E_ALL) and see what happens.

-

Babelfish says...

(my reply:)
Wie analysieren Sie das XML? Wenn Sie die Werte in eine PHP Variable lesen und 
Sie im Inhalt der Zeichenkette überzeugt sind, konnten Sie eval() benutzen... 
Auch preg_replace_callback() kann nützlich sein.

Wenn Sie eine Spitze mehr Beispiel zur Verfügung stellen, zu helfen kann 
einfacher sein. In jedem möglichem Fall denke ich, daß Ihre variablen 
Variablen eine Spitze aus whack heraus sind. Lesen Sie 
http://us3.php.net/manual/en/language.variables.variable.php

Das kann Ihr Problem, wenn es etwas wie ' beispiel ' ausgibt, und nicht ' 
beispiel $no'. Versuchen Sie, error_reporting(E_ALL) zu tun und sehen Sie, 
was geschieht.

(orignal message:)
Hello together,

I would like to offer gladly my existing app in several languages. In addition 
I have me xml more parser package installed a which in the situation am out 
xml files of contents to be inserted.

To the Bsp xml the file looks in such a way: 

example
beispiel

Functions so far. The PROBLEM however is, if I have a varible within this text 
and not everything to carve up liked, does not parst php these contents. 

Example: $$no = 10;
example ' $no.'
beispiel ' $no.'

In this case one gets the contents of the variable not indicated, but einfahc 
the ' $no.' stringer.

What there can one do? I can not possibly all write the text split up. That 
out page into one xml file is completely practically above all if it several 
languages become.

Here does someone have a good taps?

thank you in advance,

Andy


-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"If there is no higher reason--and there is none--then my own reason must be 
the supreme judge of my life."

-Leo Nikolaevich Tolstoy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 allerdings is, wenn ich eine 
varible innerhalb dieses textes habe und nicht alles zerstückeln möchte, 
 parst php diese inhalte nicht.

Beispiel: $no = 10;

example '.$no.'
beispiel '.$no.'
In diesem Fall bekommt man den Inhalt der Variable nicht angegeben, 
sondern einfahc den '.$no.' string.

Was kann man da tun? Ich kann unmöglich alle texte aufsplitten. Das 
auslagern in eine xml datei ist ganz praktisch vor allem wenn es mehrere 
Sprachen werden.

Hat hier jemand einen guten Tipp?

vielen Dank im voraus,

Andy

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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 XML or Expat...

Thanks,
  Scott F.

"Ray Hunter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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 encounters a tag (element) then it is handled by a
> predefined handler (function in this case) that is created by the
> developer.
>
> Now if you are using the DOM XML parser then the entire xml document is
> loaded as a DOM object like a tree. You can then access different
> branches (nodes) of the tree via dom functions.
>
> Each type of parser has its own pros and cons...I would suggest deciding
> which one is best for what you are doing.  For example, if you have
> large xml files to parse, then expat is probably the best way...however,
> if you need to be able to access nodes of the document in random ways
> then the DOM XML parser might be a better alternative.  Expat will be
> faster and less memory intensive than DOM.
>
> HTH...
>
> --
> Ray
>
> On Fri, 2003-10-24 at 07:03, Scott Fletcher wrote:
> > I wonder about overwritting the same tag twice, like '' and
end
> > up with one result when using hte XML parse...  Does anyone know that
PHP
> > XML Parse can work without overwriting in this case and still get two
> > different result?
> >
> > Scott F.
> >
> > "Raditha Dissanayake" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > While it's possible to process XML using regular expression. The whole
> > > point of using XML is that you wouldn't have to use hacked solutions
> > > like that :-)
> > >
> > > Scott Fletcher wrote:
> > >
> > > >Hi Fellas!
> > > >
> > > >I don't want to use the PHP's XML feature at this moment because
I
> > found
> > > >out that I need to recompile PHP with the XML support which I can't
do at
> > > >this moment.  So, instead of recompiling, does anyone know of a good
> > sample
> > > >coding or class out there on the Internet that would work   I'm
looking
> > for
> > > >something similiar like this...  Problem is I don't have good scripts
> > that
> > > >can handle the quote or double quote without missing up the XML data
and
> > PHP
> > > >Array...
> > > >
> > > >--snip--
> > > >//Individual
> > > >Bill
> > > >Clinton
> > > >M
> > > >Dog
> > > >//Joint
> > > >Hillary
> > > >Clinton
> > > >F
> > > >Cat
> > > >
> > > >//This would be return in array like...
> > > >echo $XML_Tag['FirstName'][0];  //Output would be "Bill"...
> > > >echo " "; //Whitespace...
> > > >echo $XML_Tag['LastName'][0]; //Output would be "Clinton"...
> > > >echo "'s favorate pet is a ";
> > > >echo $XML_Tag['FavoratePet']; //Output would be "Dog"...
> > > >echo " and his wife name is ";
> > > >echo $XML_Tag['FirstName'][1];  //Output would be "Hillary"...
> > > >echo " "; //Whitespace...
> > > >echo $XML_Tag['LastName'][1]; //Output would be "Clinton"...
> > > >--snip--
> > > >
> > > >Just something like that...   Thanks!!!
> > > >
> > > >Scott F.
> > > >
> > > >
> > > >
> > >
> > >
> > > -- 
> > > Raditha Dissanayake.
> >
> 
> > > http://www.radinks.com/sftp/  |
http://www.raditha/megaupload/
> > > Lean and mean Secure FTP applet with  |  Mega Upload - PHP file
uploader
> > > Graphical User Inteface. Just 150 KB  |  with progress bar.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 encounters a tag (element) then it is handled by a
predefined handler (function in this case) that is created by the
developer.

Now if you are using the DOM XML parser then the entire xml document is
loaded as a DOM object like a tree. You can then access different
branches (nodes) of the tree via dom functions.

Each type of parser has its own pros and cons...I would suggest deciding
which one is best for what you are doing.  For example, if you have
large xml files to parse, then expat is probably the best way...however,
if you need to be able to access nodes of the document in random ways
then the DOM XML parser might be a better alternative.  Expat will be
faster and less memory intensive than DOM.

HTH...

--
Ray

On Fri, 2003-10-24 at 07:03, Scott Fletcher wrote:
> I wonder about overwritting the same tag twice, like '' and end
> up with one result when using hte XML parse...  Does anyone know that PHP
> XML Parse can work without overwriting in this case and still get two
> different result?
> 
> Scott F.
> 
> "Raditha Dissanayake" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > While it's possible to process XML using regular expression. The whole
> > point of using XML is that you wouldn't have to use hacked solutions
> > like that :-)
> >
> > Scott Fletcher wrote:
> >
> > >Hi Fellas!
> > >
> > >I don't want to use the PHP's XML feature at this moment because I
> found
> > >out that I need to recompile PHP with the XML support which I can't do at
> > >this moment.  So, instead of recompiling, does anyone know of a good
> sample
> > >coding or class out there on the Internet that would work   I'm looking
> for
> > >something similiar like this...  Problem is I don't have good scripts
> that
> > >can handle the quote or double quote without missing up the XML data and
> PHP
> > >Array...
> > >
> > >--snip--
> > >//Individual
> > >Bill
> > >Clinton
> > >M
> > >Dog
> > >//Joint
> > >Hillary
> > >Clinton
> > >F
> > >Cat
> > >
> > >//This would be return in array like...
> > >echo $XML_Tag['FirstName'][0];  //Output would be "Bill"...
> > >echo " "; //Whitespace...
> > >echo $XML_Tag['LastName'][0]; //Output would be "Clinton"...
> > >echo "'s favorate pet is a ";
> > >echo $XML_Tag['FavoratePet']; //Output would be "Dog"...
> > >echo " and his wife name is ";
> > >echo $XML_Tag['FirstName'][1];  //Output would be "Hillary"...
> > >echo " "; //Whitespace...
> > >echo $XML_Tag['LastName'][1]; //Output would be "Clinton"...
> > >--snip--
> > >
> > >Just something like that...   Thanks!!!
> > >
> > >Scott F.
> > >
> > >
> > >
> >
> >
> > -- 
> > Raditha Dissanayake.
> > 
> > http://www.radinks.com/sftp/  |  http://www.raditha/megaupload/
> > Lean and mean Secure FTP applet with  |  Mega Upload - PHP file uploader
> > Graphical User Inteface. Just 150 KB  |  with progress bar.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 bracket (<) may appear
in their literal form only when used as markup delimiters, or within a
comment, a processing instruction, or a CDATA section. If they are
needed elsewhere, they must be escaped using either numeric character
references or the strings "&" and "<" respectively."   

HTH

Timo

Which seems to have been done by Nachricht. As mentioned before it's perfectly normal for sax parsers to fire too events for the same text block. The expat parser is well known for this behaviour.



--

Raditha Dissanayake
-
http://www.radinks.com/sftp/
Lean and mean Secure FTP applet with Graphical User Inteface.
just 150 Kilo Bytes


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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 "Blue, Green "
> the second time is "&"
> and the third time is " Red"

> Needless to say this is screwing up my parser, and the stuff I'm
> doing won't make it easy to add this allowance.  I'm hoping
> somebody can point out a way to turn off this behavior.  If this is
> the proper operation, is it documented anywhere? I've been unable to
> find it. 

xml is a www.w3c.org recomendation.
Its documented at http://www.w3.org/TR/REC-xml
http://www.w3.org/TR/REC-xml#syntax states:

"The ampersand character (&) and the left angle bracket (<) may appear
in their literal form only when used as markup delimiters, or within a
comment, a processing instruction, or a CDATA section. If they are
needed elsewhere, they must be escaped using either numeric character
references or the strings "&" and "<" respectively."   

HTH

 Timo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 
process it, and to reset the buffer after processing.



Justin Farnsworth wrote:
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 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"
Needless to say this is screwing up my parser, and the stuff I'm doing
won't make it easy to add this allowance.  I'm hoping somebody can point
out a way to turn off this behavior.  If this is the proper operation,
is it documented anywhere? I've been unable to find it.
--
Jeff Bearer, RHCE
Webmaster, PittsburghLIVE.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--

Raditha Dissanayake
-
http://www.radinks.com/sftp/
Lean and mean Secure FTP applet with Graphical User Inteface.
just 150 Kilo Bytes
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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, Justin Farnsworth wrote:
> 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 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"
> > 
> > Needless to say this is screwing up my parser, and the stuff I'm doing
> > won't make it easy to add this allowance.  I'm hoping somebody can point
> > out a way to turn off this behavior.  If this is the proper operation,
> > is it documented anywhere? I've been unable to find it.
> > 
> > --
> > Jeff Bearer, RHCE
> > Webmaster, PittsburghLIVE.com
> > 
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
-- 
Jeff Bearer, RHCE
Webmaster, PittsburghLIVE.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 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"
> 
> Needless to say this is screwing up my parser, and the stuff I'm doing
> won't make it easy to add this allowance.  I'm hoping somebody can point
> out a way to turn off this behavior.  If this is the proper operation,
> is it documented anywhere? I've been unable to find it.
> 
> --
> Jeff Bearer, RHCE
> Webmaster, PittsburghLIVE.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Justin Farnsworth
Eye Integrated Communications
321 South Evans - Suite 203
Greenville, NC 27858 | Tel: (252) 353-0722

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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"

Needless to say this is screwing up my parser, and the stuff I'm doing
won't make it easy to add this allowance.  I'm hoping somebody can point
out a way to turn off this behavior.  If this is the proper operation,
is it documented anywhere? I've been unable to find it.


-- 
Jeff Bearer, RHCE
Webmaster, PittsburghLIVE.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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, 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 Linux Flavor is Gentoo if that
> > helps.  If you need further information, just ask. ;)
>
> Your new PHP lacks XML support, otherwise this (and all
> the other php.net/xml functions) will be defined.  Look
> at a call to phpinfo(), you should see something like
> --disable-xml in the configure line, or maybe it's
> shared and not included...  Anyway, bottom line is, your
> PHP must now lack XML support.
>
> Regards,
> Philip
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 Linux Flavor is Gentoo if that
> helps.  If you need further information, just ask. ;)

Your new PHP lacks XML support, otherwise this (and all
the other php.net/xml functions) will be defined.  Look
at a call to phpinfo(), you should see something like
--disable-xml in the configure line, or maybe it's 
shared and not included...  Anyway, bottom line is, your
PHP must now lack XML support.

Regards,
Philip


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 further information, just ask. ;)

D



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 --> '
Data --> s been a few days since

Here is a downsized version of the script Im working with ->
-


class XMLParser
{
   var $xmlparser;

   function XMLParser()
   {
   $this->xmlparser = xml_parser_create();
   xml_set_object($this->xmlparser, $this);
   xml_set_element_handler($this->xmlparser, 'start_tag', 
'ending_tag');
   xml_set_character_data_handler($this->xmlparser, 
'character_handler');
   xml_parser_set_option ($this->xmlparser, 
XML_OPTION_CASE_FOLDING, FALSE);
   }

  function parse($data)
   {
   xml_parse($this->xmlparser, $data);
   }

   function parse_File($xmlfile)
   {
   $fp = fopen($xmlfile, 'r');
   while ($xmldata = fread($fp, 4096))
   {
   // parse the data chunk
   if (!xml_parse($this->xmlparser, $xmldata))
   {
   // if parsing fail print the error description and line 
number
   echo 'ERROR: ';
   echo 
xml_error_string(xml_get_error_code($this->xmlparser)) . '';
   echo 'Line: ';
   echo xml_get_current_line_number($this->xmlparser) . '';
   echo 'Column: ';
   echo xml_get_current_column_number($this->xmlparser) . 
'';
   }
   }

   fclose($fp);
   }

   function start_tag($xmlparser, $tag, $attributes)
   {
   echo 'Opening tag: ' . $tag . "\n";
   }

   function ending_tag($xmlparser, $tag)
   {
  echo 'Ending tag: ' . $tag . "\n";
   }

   function character_handler($xmlparser, $data)
   {
   echo 'Data --> ' . $data . "\n";
   }

   function close_Parser()
   {
   xml_parser_free($this->xmlparser);
   }
}

?>
-

Thanks for any input you may provide.

--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 parser be better
> 
> 
> 
> 
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[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.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[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 losing my ownership rights?


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




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 message
3D7FEE06.26058.356643C@localhost">news:3D7FEE06.26058.356643C@localhost...
>
>
> 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 telling me that it's not formed correctly (because of the "<" in
> > the quotes).
>
> 
> 
> 
>
> But < will most probably be displayed as < in the example the other
person gave you, only the source view shows <
>
> Peter



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




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 telling me that it's not formed correctly (because of the "<" in
> the quotes).





But < will most probably be displayed as < in the example the other person gave 
you, only the source view shows <

Peter

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] XML Parser Question

2002-09-11 Thread OrangeHairedBoy

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?

Lewis


"Martin Towell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[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]
> Subject: [PHP] XML Parser Question
>
>
> 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, is there an option I can set to allow this??
>
> If not, is there a XML parser class that anyone would recommend? I like
the
> fact that the built in one has the ability to call different subroutines
> based on the the tag information. Are there any like that which would
> support the use of < and > in quotes??
>
> Thanks all!
>
> Lewis
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




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 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, is there an option I can set to allow this??

If not, is there a XML parser class that anyone would recommend? I like the
fact that the built in one has the ability to call different subroutines
based on the the tag information. Are there any like that which would
support the use of < and > in quotes??

Thanks all!

Lewis



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[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, is there an option I can set to allow this??

If not, is there a XML parser class that anyone would recommend? I like the
fact that the built in one has the ability to call different subroutines
based on the the tag information. Are there any like that which would
support the use of < and > in quotes??

Thanks all!

Lewis



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[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
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[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 Kommunikationsplattform im Internet.
http://www.gmx.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[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't give an error.

Why is that?

TIA,
thalis


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




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 back a clean XHTML document... You can then
pass it through XML without problems...

P.S.: I never tested that, but some folk told me it's working pretty well...

>BTW - if you have an empty element such as "" , in XML you have two
>choices:
>
>1) 
>2)  (shorthand for (1) )
>
>
>At 05:09 PM 1/18/01 +, you wrote:
>
>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 need to be
>closed too?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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 some level you *can't*
process HTML as XML because it isn't XML.

As far as I understand XHMTL, it simply HTML made XML compliant, which
basically means you always have to put in an end tag.

BTW - if you have an empty element such as "" , in XML you have two
choices:

1) 
2)  (shorthand for (1) )


At 05:09 PM 1/18/01 +, you wrote:

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 need to be
closed too?

--
Shaun Butler
[EMAIL PROTECTED]
x2905

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
-
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy

http://www.steptwo.com.au/
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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 without using all of the special case rules an
HTML parser needs.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] XML Parser is a bit strict

2001-01-18 Thread Mike Heath

Really the only way around it is to not use XML since your HTML has to have
closing tags to make the XML document valid.  As far as any XML parser is
concerned your HTML is not HTML anymore but is more XML.

-Mike

-Original Message-
From: Butler, Shaun [mailto:[EMAIL PROTECTED]]
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 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 need to be
closed too?

--
Shaun Butler
[EMAIL PROTECTED]
x2905

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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 like
this, I think XML is more strict.

Chris Lee
Mediawaveonline.com



""Butler, Shaun"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> 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 need to be
> closed too?
>
> --
> Shaun Butler
> [EMAIL PROTECTED]
> x2905
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[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 need to be 
closed too?  

-- 
Shaun Butler
[EMAIL PROTECTED]
x2905

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[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 should create a php
script to access my databases and output the data in
the requested format, right ?

Well close but not quite.  I am supposed to parse the
file with the DTD in order to validade it.

This seems to be the place where I got lost.  So how
exactly (with php or perhaps another tool) can do this
?

Thanks.

PS. If possible send me some urls with a tutorial of
XML so my next questions wont be so basic ;)

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]