Re: [PHP] comparing xml files, removing some html tags

2003-08-20 Thread Robert Mena
Thanks to all (actually just one) that answered my
question.  Unfortunatelly I was hoping a more
complete answer since the part I asked was not the
main goal... bu t anyway...

I'd like to ask then if the viewers could validate my
new approach or at least point ways of actually
implementing it.

Suppose I use Xerces and tidy to turn two html files
into two xhtml ones.

I'd like to remove the data found between the Tags and
generate two new files only with the scructure
elements (tables, Br, p and so on).

Then I could use regular diff from unix and if they
differ in more than X% I assume they are different.

Assuming that this approach is ok any tips regarding
the actual implementation ?  Any snippets of code
would be great.


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] comparing xml files, removing some html tags

2003-08-20 Thread [EMAIL PROTECTED]
Hi,
Discussion of xerces will take us out of the mandate of this list. 
Please download xerces from http://xml.apache.org along with the 
documents and you will see plenty of sample codes. You might also want 
to look at IBM's developer site (IBM created the bulk of xerces)

all the best
raditha
Robert Mena wrote:

Thanks to all (actually just one) that answered my
question.  Unfortunatelly I was hoping a more
complete answer since the part I asked was not the
main goal... bu t anyway...
I'd like to ask then if the viewers could validate my
new approach or at least point ways of actually
implementing it.
Suppose I use Xerces and tidy to turn two html files
into two xhtml ones.
I'd like to remove the data found between the Tags and
generate two new files only with the scructure
elements (tables, Br, p and so on).
Then I could use regular diff from unix and if they
differ in more than X% I assume they are different.
Assuming that this approach is ok any tips regarding
the actual implementation ?  Any snippets of code
would be great.
__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
 



--
http://www.raditha.com/php/progress.php
A progress bar for PHP file uploads.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] comparing xml files, removing some html tags

2003-08-17 Thread Robert Mena
Hi,

I need to compare two XML files in order to find if
they are similar, i.e their DOM tree have the same
structure.

The ideia is to use Xerces to balance HTML files in
order to create Xhtml and then compare.

To make things a little easier for Xerces I am
considering to remove some elements that do not make
diference for my similarity point of view, for
example, script/script tags, before calling
xerces.

So I was wondering which regular expression should I
use to remove the scriptcontent/script and so
on...

regards.



__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php