Various type sof literal blocks =============================== Paragraph: :: Literal block, where \ are preserved. Paragraph: :: Literal block Which may also contain multiple lines, where indentation should be maintained. Paragraph:: Literal block Do handle all types of special characters, just as they are, like those tokenizer regular expressions: array ( 1 => '(\A(?P<value>[ \t]+))S', 2 => '(\A(?P<value>\r\n|\r|\n))S', 4 => '(\A(?P<value>([!"#$%&\'()*+,./:;<=>?@[\]^_`{|}~-]|\xe2\x80\xa2|\xe2\x80\xa3|\xe2\x81\x83)\2*))S', 3 => '(\A(?P<value>\\))S', 5 => '(\A(?P<value>(?: [^`*_\\[\]|()"\':.\r\n\t ]|[^`*_\\[\]|()"\':.\r\n\t ])+))S', ) John Doe wrote:: >> Great idea! > > Why didn't I think of that? You just did! ;-) Deacreasing indentation:: Decreasing indentation should also work! Tabs: :: $doc = new ezcDocumentXhtmlDocument(); $result_1 = $doc->validate( '/path/to/first.htm' ); $result_2 = $doc->validate( '/path/to/second.htm' ); foreach ( $result_1 as $error ) { echo "- {$error->msg} in {$error->line} in {$error->file}.\n"; }