Re: appending to XML file before closing tag

From: Date: Wed, 26 Jun 2002 13:24:27 +0000
Subject: Re: appending to XML file before closing tag
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-103960@lists.php.net to get a copy of this message
On Tuesday, June 25, 2002, at 08:42 PM, Brian White wrote:
I was actually thinking about this the other day - every now and again I find my self yearning for SGML, where you could have just declared the wrapping element "end tag omissable", and then you would never have to worry about it - basically the end of the file would imply the existence of the end tag (sigh .... )
Yes, but that makes parsing very difficult -- if you're expecting to find a closing tag, it should be there. You'd have to write a special set of XML-handling functions or a special library to cover this unique breach of the XML rules, since most XML modules (for Perl, PHP, Python, Java, whatever) expect well-formed documents. XML is pretty verbose, yes, but the rewards of this are consistency -- as long as the document is well-formed, it should be pretty easy to extract the data from it without writing special code to handle these kinds of exceptions. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com

« previous php.general (#103960) next »