parsing entities
| From: | Decapode Azur | Date: | Tue, 30 Mar 2004 14:28:09 +0000 |
| Subject: | parsing entities | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-181820@lists.php.net to get a copy of this message | ||
hello,
I am parsing an xhtml template throught the php xml expat parser.
But the problem is that it removes all entities from the xhtml template
such as or & (in href anchors attributes)
The entities can't be handle with xml_set_default_handler because some
entities are inside an attribute (title, href) and are then printed before
the tag. How can I fix this?
I don't understand how those other functions work:
http://www.php.net/manual/en/function.xml-set-external-entity-ref-handler.php
http://www.php.net/manual/en/function.xml-set-unparsed-entity-decl-handler.php
Could it be the solution?
Another problem is that it changes tags like <img /> by <img></img>.
Is there a way to avoid this?
+ Cheers
(PS - I am also curious about how the fuction
xml_set_start_namespace_decl_handler() work.
Does someone know some informations about?)