Bug #63060 [Com]: Option LIBXML_NOEMPTYTAG is ignored
| From: | reeze dot xia at gmail dot com | Date: | Tue, 11 Sep 2012 12:12:01 +0000 |
| Subject: | Bug #63060 [Com]: Option LIBXML_NOEMPTYTAG is ignored | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-173321@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63060&edit=1
ID: 63060
Comment by: reeze dot xia at gmail dot com
Reported by: maglor at i dot ua
Summary: Option LIBXML_NOEMPTYTAG is ignored
Status: Open
Type: Bug
Package: SimpleXML related
Operating System: Windows XP SP3
PHP Version: 5.3.16
Block user comment: N
Private report: N
New Comment:
Hi maglor,
http://php.net/manual/en/libxml.constants.php
LIBXML_NOEMPTYTAG (integer)
Expand empty tags (e.g. <br/> to <br></br>)
Note:
This option is currently just available in the DOMDocument::save and
DOMDocument::saveXML functions.
Previous Comments:
------------------------------------------------------------------------
[2012-09-11 09:36:02] maglor at i dot ua
Description:
------------
Option LIBXML_NOEMPTYTAG is ignored for SimpleXMLElement::__construct() and simplexml_load_string()
Probably, for simplexml_load_file() also.
Test script:
---------------
<?php
$xml = new SimpleXMLElement('<?xml version="1.0"
encoding="utf-8"?><request><packet></packet></request>',
LIBXML_NOEMPTYTAG);
$xml->saveXML();
Expected result:
----------------
<?xml version="1.0" encoding="utf-8"?>
<request><packet></packet></request>
Actual result:
--------------
<?xml version="1.0" encoding="utf-8"?>
<request><packet/></request>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63060&edit=1