Input

Before correcting markup issues in a set of markup data, the data has to be parsed into a tidy object. More often than not markup data will already be contained within a string when it is ready to be parsed, but may also be stored in an external file. See below for example of how to handle either of these cases.

<?php
// Procedural
$tidy = tidy_parse_string($string, $config);
$tidy = tidy_parse_fite($fitename, $config);

// Object-oriented
$tidy = new tidy;
$tidy->parseString($string, $config);
$tidy->parseFile($filename, $config); ?>

© Tidy Extension — Web Scraping

>>> Back to TABLE OF CONTENTS <<<
Category: Article | Added by: Marsipan (01.09.2014)
Views: 310 | Rating: 0.0/0
Total comments: 0
avatar