Re: [PHP] XML and htmlentities conditionally?
Brian V Bonini wrote: On Sun, 2006-01-29 at 02:01, Adam Hubscher wrote: I have a block of XML that looks as follows: <*_~_*> Røyken VGS <*_~_*> My question is, can I in any way efficiently (i -stress- efficiently, if anyone read my previous XML and special characters post its a rather large XMl file (breaking 18mb now) and speed is of the essence) cause html_entity_decode to not decode those tags? What's the end results your looking for? If you are trying to pass that data straight through the parser try wrapping it in CDATA. The information is used to keep a database up to date for a service that was created in order to provide more advanced functionality for the service that made it. The XML file is not -mine-, and to search for all the html entities and wrap them in cdata before parsing would be kinda silly I think :O So yea, thats what I was trying to avoid having to do :O -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML and htmlentities conditionally?
On Sun, 2006-01-29 at 02:01, Adam Hubscher wrote: > I have a block of XML that looks as follows: > > <*_~_*> Røyken VGS <*_~_*> > My question is, can I in any way efficiently (i -stress- efficiently, if > anyone read my previous XML and special characters post its a rather > large XMl file (breaking 18mb now) and speed is of the essence) cause > html_entity_decode to not decode those tags? What's the end results your looking for? If you are trying to pass that data straight through the parser try wrapping it in CDATA. -- s/:-[(/]/:-)/g BrianGnuPG -> KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx-design.com/keys Linux Registered User #339825 at http://counter.li.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML and htmlentities conditionally?
I have a block of XML that looks as follows: <*_~_*> Røyken VGS <*_~_*> Now, if I run that block of XML through htmlentities, I will get the following: <*_!_*> Røyken VGS <*_~_*> XML parsers will return a problem, as there is both an unclosed tag and an invalid tag, in two places no less (however the error will occur on the first "tag". In order for this particular XML file to parse properly, I -must- run html_entity_decode. This causes quite the predicament as if I were to then run htmlentities() on this portion of the file, it would produce quite a bit of chaos. My question is, can I in any way efficiently (i -stress- efficiently, if anyone read my previous XML and special characters post its a rather large XMl file (breaking 18mb now) and speed is of the essence) cause html_entity_decode to not decode those tags? Or any other way would be nice too, I'm pretty much open to anything... as long as it doesnt severely hurt the efficiency of the script. (I discovered the error of my ways in the previous problem btw, having a doctype helps... me == brainded in that :s) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php