Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

HTML to XML in Perl?
Suppose I want to translate an HTML to a XML-well-formed HTML (so that
I can, e.g., apply xsltproc to the result).  E.g., HTML::TreeBuilder
can apply "usual heuristics" to parse HTML; how to get XML out of it?

Thanks,
Ilya

Report this thread to moderator Post Follow-up to this message
Old Post
Ilya Zakharevich
05-12-06 12:57 PM


Re: HTML to XML in Perl?
Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote:

> Suppose I want to translate an HTML to a XML-well-formed HTML (so that
> I can, e.g., apply xsltproc to the result).  E.g., HTML::TreeBuilder
> can apply "usual heuristics" to parse HTML; how to get XML out of it?

Question: I use XML, not XHTML, at home, and use XML::Twig to convert it
to HTML. I can use xsltproc if I want to on the XML file.

You might want to traverse the parse tree HTML::TreeBuilder generates.
Also, not 100% sure, but it might me that HTML tidy can do the XHTML
conversion for you:

Google...

"Validator fixes errors in HTML and XHTML. Converts HTML to XHTML. Free
Software."

http://www.google.com/search?q=html%20tidy%20xhtml

Sounds like it does :-D.

--
John Bokma          Freelance software developer
&
Experienced Perl programmer: http://castleamber.com/

Report this thread to moderator Post Follow-up to this message
Old Post
John Bokma
05-13-06 02:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Modules archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:10 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.