Re: XML Parser is a bit strict
| From: | Brian White | Date: | Fri, 19 Jan 2001 00:52:38 +0000 |
| Subject: | Re: XML Parser is a bit strict | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-35529@lists.php.net to get a copy of this message | ||
( 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 "<br>" , in XML you have two
choices:
1) <br></br>
2) <br/> (shorthand for (1) )
At 05:09 PM 1/18/01 +0000, 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
php@sbutler.org
x2905
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
-------------------------
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
http://www.steptwo.com.au/
bwhite@steptwo.com.au