Re: Strange character conversion when converting XML by XSLT in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Age Bosma wrote:
I'm converting, or at least trying, one XML file to another XML format using XSLT parsing it with PHP.

I'm using a lot of characters in the following style "& #34;", "& #42;", etc. (without the space, added now the prevent any conversion in this e-mail) in the XML file and I would like to keep it that way. PHP is converting every string like these to e.g. "&qout;" or "*". What can be done to prevent this conversion?

As far as I understand this is default behaviour of the parser and can not be prevented. Personally I consider this a bug because what if I just want to use "& #34;" (without the space) as a normal string value? The parser shouldn't touch it at all.

Can someone enlighten me a bit more on this one? :-)

If you want a literal " in your data, then you should have ", iirc. Maybe you could run the data through a preparser to match "&#xx;" patterns and convert the & to & ??


--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux