473,799 Members | 3,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

html tidy in c#

Hi,

I am having the html tidy in c# issue.
I parse a lot of html pages with sports data. For this I need them
converted in xml.

I am using html tidy libraries: zetaHtmlTidy from codeproject,
EFTidyLib (from sourceforge), and TidyATL COM wrapper, Chilkat HTML 2
XML.

They do work on some pages but on some they dont. I get Stack Over
Flow or empty string.

Html pages on wich it doesn't work are pages on www.bluesquare.com and
on www.caribsports.com with sports data.

Maybe someone who converted a lot of htmls could tell me some more
components.
I am also looking for non-free components. ANy componnet/ solution /
sugestion is welcome.
Paul

Apr 24 '07 #1
3 6471
Paul,

It's entirely possible to have HTML so hideous that it's amazing the
browser can even render it. I've used HTMLTidy (the utility) and in my
experience it's far too idealistic (understandable given that it comes
out of people at the W3C) and it upchucks on all sorts of things. It's
a circular problem: you want to tidy up some crap code so you can
figure out WTF it's doing so you can take out the crap. But the crap
keeps it from being tidied up.

What would really be grand is something that riffs off the HTML parser
in IE or FireFox, which are much more, shall we say, "real world"
parsers. There is a Firefox plugin called "view source chart" that does
a pretty good job of figuring out random HTML and displaying it in a
useful format. I don't know if the source is available to that, but it
or something out of Firefox open source might be the ticket for
producing a useful API you could leverage. It could provide the implied
missing closures for certain tags, etc., giving you the virtual HTML
that's actually rendering rather than the broken HTML, should you wish.

My kingdom for some free time!

--Bob

pa*******@gmail .com wrote:
Hi,

I am having the html tidy in c# issue.
I parse a lot of html pages with sports data. For this I need them
converted in xml.

I am using html tidy libraries: zetaHtmlTidy from codeproject,
EFTidyLib (from sourceforge), and TidyATL COM wrapper, Chilkat HTML 2
XML.

They do work on some pages but on some they dont. I get Stack Over
Flow or empty string.

Html pages on wich it doesn't work are pages on www.bluesquare.com and
on www.caribsports.com with sports data.

Maybe someone who converted a lot of htmls could tell me some more
components.
I am also looking for non-free components. ANy componnet/ solution /
sugestion is welcome.
Paul
Apr 24 '07 #2
Bob,

Thanks for your answer.

Do you know some utilities that tidy up and also TELL you what the
problems are?
I mean, some better utilities.

Once I know the problems I 'll write my own code to fix them.

Paul

Apr 30 '07 #3
Bob,

Thanks for your answer.

Do you know some utilities that tidy up and also TELL you what the
problems are?
I mean, some better utilities.

Once I know the problems I 'll write my own code to fix them.

Paul

Apr 30 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4240
by: Anders Eriksson | last post by:
Hello! I want to extract some info from a some specific HTML pages, Microsofts International Word list (e.g. http://msdn.microsoft.com/library/en-us/dnwue/html/swe_word_list.htm). I want to take all the words, both English and the other language and create a dictionary. so that I can look up About and get Om as the answer. How is the best way to do this?
2
1529
by: John Resler | last post by:
Hi all, First I want to say I am fully aware of the huge scope of the problem of parsing and correcting files of any sort. I have been using the jTidy libraries (Dave Raggett W3C, I believe) to attempt to clean up the html I use and convert it to xhtml if possible. Not to complain about Tidy, it is the only application I'm aware of that does what it does... I am just curious if there are any other applications/libraries that perform the...
3
2779
by: Mike | last post by:
Greetings, I just used Tidy HTML for the first time. The address below contains the files need to check on Tidy's corrections. I would appreciate any feedback on the Tidy report and the necessity and validity of the changes Tidy has made or recommended. The following is obvious to me: line 194 column 98 - Warning: discarding unexpected </font>
13
2736
by: Arie Mijnlieff | last post by:
Hi ! I have an html file (http://www.kpc.nl/home.html) which i send to the w3 validator as well as to a an online HTML tidy script. The w3 validator (validator.w3.org) claims the frameset tag doesnt have a border tag whereas the html tidy script (http://infohound.net/tidy/tidy.pl) claims everything is ok.. Who is right ? I am asking this because i would like to write clean
0
1855
by: Christoph Schneegans | last post by:
Hi! I'd like to present an easy, yet powerful approach to use the HTML Tidy program from <http://tidy.sourceforge.net/> in ASP.NET. It is similiar to <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/tchVSAddinEnablingHTMLTidy.asp>. However, it is not implemented as a Visual Studio Add-in, but as a response filter. This way, the complete HTML source is tidied, including the output of web controls.
40
5618
by: VK | last post by:
Hi, After the response on my request from W3C I'm still unclear about Tidy vs. Validator discrepansies. That started with <IFRAME> issue, but there is more as I know. Anyway, this very basic HTML page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html401/strict.dtd"> <html> <head>
2
2037
by: Sebastian Gohres | last post by:
Hi! First: sorry for my bad english :) If I parse template files, html tidy remove all tags beginning with { for example: before: <select name="country" size="1">
1
3138
by: Carmen Sei | last post by:
I need to parse HTML page and extract data should I use HTML Tidy DLL http://dev.int64.org/tidy.html or it's easier to use library with source code like http://users.rcn.com/creitzel/tidy.html#cplusplus which HTML Tidy C++ version (easiest) should I use for C++ project?
0
1246
by: tobycraftse | last post by:
any example shows how to use HTML Tidy in VC++ project? I need to parse HTML page and extract data should I use HTML Tidy DLL http://dev.int64.org/tidy.html or it's easier to use library with source code like http://users.rcn.com/creitzel/tidy.html#cplusplus
0
569
by: Lars Eighner | last post by:
In our last episode, <004f629c$0$10265$c3e8da3@news.astraweb.com>, the lovely and talented mark4asp broadcast on comp.infosystems.www.authoring.html: I have not done this, not even on TV.
0
9686
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10250
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10026
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9068
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.