XML_Beautifier
[ class tree: XML_Beautifier ] [ index: XML_Beautifier ] [ all elements ]

Source for file example7.php

Documentation is available at example7.php

  1. <?PHP
  2. /**
  3.  * XML_Beautifier example 7
  4.  *
  5.  * This example shows to to change the treatment
  6.  * of data section
  7.  *
  8.  * @author    Stephan Schmidt <schst@php.net>
  9.  */
  10.     error_reportingE_ALL );
  11.  
  12.     require_once 'XML/Beautifier.php';
  13.  
  14.     $fmt = new XML_Beautifierarray'removeLineBreaks' => false ) );
  15.     $result $fmt->formatFile('test3.xml');
  16.  
  17.     echo "<h3>Original file</h3>";
  18.     echo "<pre>";
  19.     echo htmlspecialchars(implode("",file('test3.xml')));
  20.     echo "</pre>";
  21.         
  22.     echo    "<br><br>";
  23.     
  24.     echo "<h3>Beautified output</h3>";
  25.     echo "<pre>";
  26.     echo htmlspecialchars($result);
  27.     echo "</pre>";
  28. ?>

Documentation generated on Mon, 11 Mar 2019 15:41:39 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.