note 55029 deleted from function.xml-parse by mazzanet

From: Date: Fri, 22 Jul 2005 21:29:58 +0000
Subject: note 55029 deleted from function.xml-parse by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-92322@lists.php.net to get a copy of this message
Note Submitter: mark meves ---- I'm working on improving these great, simple parsers too. Will post soon. Note that your whitespace logic should be covered by using xml_parser_set_option(), (see) and not done manually in your CDATA handler. (make a method that wraps this and error checks its result) There are cases where you don't want to ignore whitespace, for example to unparse an xml document (tree) and have it maintain its readability. (as a string, not a structure)x Consider, also, cases where you have <div>some text <b>and some more</b> and then this</div> How does your parser parse this above line? If a parse tree node is comprised of 'attributes','cdata','children' note that the above line has both 'children' and 'cdata'. (i read somewhere once that this is problematic. now i know why). i am working on a solution to cover this. I suggest either but the cdata as a string in "children" in all cases (easiest) or a more complex solution I won't elaborate on here. Realize that we are re-inventing the DOM wheel that has been solved hundreds of times. Talk soon, code till dawn, mark d o t meves at gmail d o t com

« previous php.notes (#92322) next »