|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-01-08 21:13 UTC] felipe@php.net
[2008-01-09 09:47 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 12:00:01 2025 UTC |
Description: ------------ fullEndElement() procedure produces wrong indentation when called setIndent(true). There is no new line and indentation before tag following another end tag produced by fullEndElement(). Reproduce code: --------------- $xml = new XMLWriter(); $xml->openMemory(); $xml->setIndent(true); $xml->startElement('body'); $xml->startElement('div'); $xml->writeAttribute('id', 'all'); $xml->startElement('div'); $xml->writeAttribute('id', 'header'); $xml->fullEndElement(); $xml->startElement('div'); $xml->writeAttribute('id', 'content'); $xml->fullEndElement(); $xml->startElement('div'); $xml->writeAttribute('id', 'footer'); $xml->fullEndElement(); $xml->fullEndElement(); $xml->fullEndElement(); echo $xml->outputMemory(); Expected result: ---------------- <body> <div id="all"> <div id="header"></div> <div id="content"></div> <div id="footer"></div> </div> </body> Actual result: -------------- <body> <div id="all"> <div id="header"></div> <div id="content"></div> <div id="footer"></div></div></body>