Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
The examples in this directory show how to work with XML.

* html_to_text.php: Shows how to write PHP callbacks for a SAX
  parser. It captures the HTML output generated by the php cgi binary
  and uses the php callbacks to convert it into a text document. This
  example requires PHP 5. It might be possible to adapt the php code for
  PHP 4, but it will be slow because PHP 4 passes objects as values.
  In php4 the function:
    function characters ($chars, $start, $length)
    {
      $s = new java("java.lang.String", $chars, $start, $length);
      echo $s->toString();
    }
  would receive the entire document in $chars (as an array) just to
  send it back in the next call to create a sub-string.

* ellipse.php: Creates a SVG picture in the current directory.