merge from 1.7.3.5(r13153:r13167)

git-svn-id: http://xe-core.googlecode.com/svn/trunk@13168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2013-09-29 23:32:39 +00:00
parent cc47d2b247
commit 2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions

View file

@ -1,4 +0,0 @@
/LICENSE/1.3/Tue Apr 13 21:22:43 2004//
/README/1.1.1.1/Mon Oct 6 19:17:41 2003//
/release.sh/1.1.1.1/Mon Oct 6 19:17:41 2003//
D/src////

View file

@ -1,4 +0,0 @@
/LICENSE////
/README////
/release.sh////
D/src////

View file

@ -1,3 +0,0 @@
/LICENSE////
/README////
/release.sh////

View file

@ -1,4 +0,0 @@
/LICENSE/1.3/Tue Apr 13 21:22:43 2004//
/README/1.1.1.1/Mon Oct 6 19:17:41 2003//
/release.sh/1.1.1.1/Mon Oct 6 19:17:41 2003//
D

View file

@ -1 +0,0 @@
phphtmlparser

View file

@ -1 +0,0 @@
:ext:jhsolorz@cvs.sourceforge.net:/cvsroot/php-html

View file

@ -1,70 +0,0 @@
HTML Parser for PHP 4
---------------------
This is a simple PHP based HTML parser.
How to Use
----------
Simply copy src/htmlparser.inc to a location in your
codebase where you'd like to be able to include it.
The PHP file which uses the parser might look like
this:
<?
include ("htmlparser.inc");
$htmlText = "... HTML text here ...";
HtmlParser parser = new HtmlParser ($htmlText);
while ($parser->parse()) {
// Data you can use here:
//
// $parser->iNodeType
// $parser->iNodeName
// $parser->iNodeValue
// $parser->iNodeAttributes
}
You will find additional documentation for each
field in the source code.
?>
Files of Interest
-----------------
src/htmlparser.inc -- Has HtmlParser class
src/html2text.inc -- Has Html2Text class
src/ex_dumptags.php -- Example: Dumps HTML nodes from test HTML string
src/ex_html2text.php -- Example: Dumps text for test HTML string
Running examples offline
------------------------
On a Unix system, you can run the examples as follows
if you have PHP installed:
cd src
php < ex_dumptags.php
php < ex_html2text.php
License
-------
This is an open source project. The license is
based on the Apache Software License. See the file
named LICENSE.
Author
------
The parser and the HTML-to-text example were written
by Jose Solorzano of Starnetsys, LLC. If you need a
program or website developed, professionally, within
budget, and on time, contact us (http://starnetsys.com)

View file

@ -1,10 +0,0 @@
#!/bin/sh
if [ "$TEMP" = "" ]; then
TEMP="/tmp";
fi
rm -f `find . -name '*~'`
(cd ..; tar cvf $TEMP/phphtmlparser$1.tar phphtmlparser)
gzip $TEMP/phphtmlparser$1.tar

View file

@ -1,7 +0,0 @@
/ex_dumptags.php/1.2/Wed Oct 29 16:42:53 2003//
/ex_dumpurl.php/1.3/Fri Apr 16 15:52:39 2004//
/ex_html2text.php/1.2/Fri Apr 16 15:52:39 2004//
/html2text.inc/1.3/Wed Oct 29 16:42:53 2003//
/htmlparser.inc/1.5/Fri Apr 16 15:52:39 2004//
/testfile.html/1.2/Fri Apr 16 15:52:39 2004//
D

View file

@ -1,6 +0,0 @@
/ex_dumptags.php////
/ex_dumpurl.php////
/ex_html2text.php////
/html2text.inc////
/htmlparser.inc////
/testfile.html////

View file

@ -1 +0,0 @@
phphtmlparser/src

View file

@ -1 +0,0 @@
:ext:jhsolorz@cvs.sourceforge.net:/cvsroot/php-html

View file

@ -1,11 +0,0 @@
<?
include ("htmlparser.inc");
$htmlText = "<html><!-- comment --><body>This is the body</body></html>";
$parser = new HtmlParser($htmlText);
while ($parser->parse()) {
echo "-----------------------------------\r\n";
echo "Node type: " . $parser->iNodeType . "\r\n";
echo "Node name: " . $parser->iNodeName . "\r\n";
echo "Node value: " . $parser->iNodeValue . "\r\n";
}
?>

View file

@ -1,29 +0,0 @@
<?
// Example:
// Dumps nodes from testfile.html.
// To run: php < ex_dumpurl.php
include ("htmlparser.inc");
$parser = HtmlParser_ForFile ("testfile.html");
//$parser = HtmlParser_ForURL ("http://yahoo.com");
while ($parser->parse()) {
echo "-----------------------------------\r\n";
echo "Name=" . $parser->iNodeName . ";";
echo "Type=" . $parser->iNodeType . ";";
if ($parser->iNodeType == NODE_TYPE_TEXT || $parser->iNodeType == NODE_TYPE_COMMENT) {
echo "Value='" . $parser->iNodeValue . "'";
}
echo "\r\n";
if ($parser->iNodeType == NODE_TYPE_ELEMENT) {
echo "ATTRIBUTES: ";
$attrValues = $parser->iNodeAttributes;
$attrNames = array_keys($attrValues);
$size = count($attrNames);
for ($i = 0; $i < $size; $i++) {
$name = $attrNames[$i];
echo $attrNames[$i] . "=\"" . $attrValues[$name] . "\" ";
}
}
echo "\r\n";
}
?>

View file

@ -1,18 +0,0 @@
<?
// Example: html2text
// Converts HTML to formatted ASCII text.
// Run with: php < ex_html2text.php
include ("html2text.inc");
$htmlText = "Html2text is a tool that allows you to<br>" .
"convert HTML to text.<p>" .
"Does it work?";
$htmlToText = new Html2Text ($htmlText, 15);
$text = $htmlToText->convert();
echo "Conversion follows:\r\n";
echo "-------------------\r\n";
echo $text;
?>

View file

@ -1,8 +0,0 @@
<!-- first comment --> <!-- second comment -->
<elem attribute1="foobar" attribute2=""/>Text After Elem
<!--comment1-->
<elem2>Text</elem2>
<!-- comment2-->
<elem3 attribute3='insinglequotes'/>
<!--comment3 -->Text between comments<!-- comment4 -->
<elem4/>