Location: PHPKode > scripts > HTMLSax > htmlsax/readme.php
	(c) Copyright by Alexander Zhukov hide@address.com Released under LGPL
	TODO: correct comment handling


// Sample HTML text
$html = "
			my test title
		<body topmargin=10>
		<h1>A test text</h1>
		example text1
		example text2
		<a href=http://test/?asd>test link</a>
		<img src=\"/images/smile.gif\" width=100 height=100>
		<table width=100% bgcolor=\"black\">
			<tr color=#cceeff>

class MySax extends HTMLSax
	function MySax()
		$this->skipWhitespace = 1; // turn this on if you want to skip whitespace between tags
		$this->trimDataNodes = 1; // turn this on if you want to trim the data nodes 
	function handle_data($data)
		echo "data node \"$data\"<br>";

	function handle_start_tag($tag,$attribs)
		echo "start tag \"$tag\"<br>";

	function handle_end_tag($tag)
		echo "end tag \"$tag\"<br>";


$p = new MySax();

Return current item: HTMLSax