Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » PHP
  • » [PHP-DEV] Issues with SimpleXML for development [RSS Feed]

#1 Nov. 27, 2005 20:50:42

Rowan L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Issues with SimpleXML for development


First off, forgive me if I'm using the wrong list.

Anyhow, I've been developing a program that uses XML to store cache
files, and I've noticed a highly painfully issue with the SimpleXML
extension:

It converts <textarea></textarea> (and many other like valid XML and
HTML elements) to <textarea /> (only valid XML).

This, for anyone dealing with XHTML, is a big issue, as it will cause
any page to break, one solution would be to use XSL, but the PHP5
extension for that doesn't support XHTML, and causes many more issues.

There is a bug about this marked 'bogus', but I'd just like to point
out that this bug is not bogus and is a severe hindrance to anyone
using SimpleXML.

Bug:http://bugs.php.net/bug.php?id=32307--
____
Rowan Lewis (AKA. The Wolf)

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#2 Nov. 27, 2005 21:01:36

Bastian G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Issues with SimpleXML for development


Hi Rowan,

the PHP5 XSL extension *does* support XHTML and HTML.

And yes, you should use a more general/help list for that kind of issues.

Rowan Lewis wrote:First off, forgive me if I'm using the wrong list.

Anyhow, I've been developing a program that uses XML to store cache
files, and I've noticed a highly painfully issue with the SimpleXML
extension:

It converts <textarea></textarea> (and many other like valid XML and
HTML elements) to <textarea /> (only valid XML).

This, for anyone dealing with XHTML, is a big issue, as it will cause
any page to break, one solution would be to use XSL, but the PHP5
extension for that doesn't support XHTML, and causes many more issues.

There is a bug about this marked 'bogus', but I'd just like to point
out that this bug is not bogus and is a severe hindrance to anyone
using SimpleXML.

Bug:http://bugs.php.net/bug.php?id=32307--
____
Rowan Lewis (AKA. The Wolf)--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#3 Nov. 27, 2005 21:10:51

Christian S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Issues with SimpleXML for development


On 27.11.2005 21:50 Uhr, Rowan Lewis wrote:
> First off, forgive me if I'm using the wrong list.
>
> Anyhow, I've been developing a program that uses XML to store cache
> files, and I've noticed a highly painfully issue with the SimpleXML
> extension:
>
> It converts <textarea></textarea> (and many other like valid XML and
> HTML elements) to <textarea /> (only valid XML).

What's exactly your problem?

***
<?php
$xml = simplexml_load_string('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<body>
<textarea/>
<p/>
<br/>
</body>
</html>');

print ( $xml->body->asXML());

***

$ php5 xhtml.php
<body>
<textarea></textarea>
<p></p>
<br />
</body>

***

Anyway, not a PHP issue, libxml2 handles all that, so maybe upgrading
libxml2 helps...

chregu



>
> This, for anyone dealing with XHTML, is a big issue, as it will cause
> any page to break, one solution would be to use XSL, but the PHP5
> extension for that doesn't support XHTML, and causes many more issues.
>
> There is a bug about this marked 'bogus', but I'd just like to point
> out that this bug is not bogus and is a severe hindrance to anyone
> using SimpleXML.
>
> Bug:http://bugs.php.net/bug.php?id=32307>
> --
> ____
> Rowan Lewis (AKA. The Wolf)
>

--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 44 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71http://www.bitflux.ch| | GPG 0x5CE1DECB

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

  • Root
  • » PHP
  • » [PHP-DEV] Issues with SimpleXML for development [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of January
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support