|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63060 Option LIBXML_NOEMPTYTAG is ignored
Submitted: 2012-09-11 09:36 UTC Modified: -
Avg. Score:4.0 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: maglor at i dot ua Assigned:
Status: Open Package: SimpleXML related
PHP Version: 5.3.16 OS: Windows XP SP3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-09-11 09:36 UTC] maglor at i dot ua
Option LIBXML_NOEMPTYTAG is ignored for SimpleXMLElement::__construct() and simplexml_load_string() 

Probably, for simplexml_load_file() also.

Test script:

$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><request><packet></packet></request>', LIBXML_NOEMPTYTAG);

Expected result:
<?xml version="1.0" encoding="utf-8"?>

Actual result:
<?xml version="1.0" encoding="utf-8"?>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-11 12:12 UTC] reeze dot xia at gmail dot com
Hi maglor,

Expand empty tags (e.g. <br/> to <br></br>)

This option is currently just available in the DOMDocument::save and 
DOMDocument::saveXML functions.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Jan 21 02:01:23 2020 UTC