|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63060 Option LIBXML_NOEMPTYTAG is ignored
Submitted: 2012-09-11 09:36 UTC Modified: 2020-03-14 16:56 UTC
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: cmb (profile)
Status: Closed Package: SimpleXML related
PHP Version: 5.3.16 OS: Windows XP SP3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
25 + 26 = ?
Subscribe to this entry?

 [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.
 [2020-02-13 17:07 UTC]
-Status: Open +Status: Verified -Type: Bug +Type: Documentation Problem
 [2020-02-13 17:07 UTC]
The $options parameter of `SimpleXMLElement::construct()`,
`simplexml_load_string()` and `simplexml_load_file()` is only
relevant for options which affect the *reading* of XML.  It is not
supposed to apply to *writing*.
 [2020-03-14 16:56 UTC]
Automatic comment from SVN on behalf of cmb
Log: Fix #63060: Option LIBXML_NOEMPTYTAG is ignored
 [2020-03-14 16:56 UTC]
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2020-03-14 16:56 UTC]
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-03-14 16:58 UTC]
Automatic comment on behalf of cmb
Log: Fix #63060: Option LIBXML_NOEMPTYTAG is ignored
 [2020-03-14 23:00 UTC]
Automatic comment from SVN on behalf of mumumu
Log: Fix #63060: Option LIBXML_NOEMPTYTAG is ignored
 [2020-03-14 23:05 UTC]
Automatic comment on behalf of mumumu
Log: Fix #63060: Option LIBXML_NOEMPTYTAG is ignored
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Sep 27 21:01:25 2020 UTC