Does W3 DOM Level 1 (HTML) Support on the .NET platform exist anywhere?

U

uv2003

Greetings,

I've been searching for a way to use the W3 DOM Level 1 interfaces in a
native .NET implementation without any luck. Does anyone know if
something like this exists?

Specifically, I'm refering to this:
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html.html

So far, I've seen a lot of people mention MSHTML or the Web Browser
control. These are not viable options since I'm writing a class library
that I want to be 100% .NET managed code and depend on nothing but the
CLR and the base framework.

The best starting point I've seen so far is Simon Mourier's
HTMLAgilityPack http://smourier.blogspot.com/. This is a great library
for parsing HTML into a navigable structure, even malformed html, but
it does not implement the W3 interfaces.

I'd like to be able to parse a document into a DOM tree, then perform
standard calls the same way you would do in JavaScript in the web
browser regarding FORM element collections:

Javascript:

document.forms[0].elements[0].options[0] ... etc etc

Pseudo .net:

using W3.DOM.Level1;

Document d = new Document(htmlDataStringFromSomeFileOrDownload);

d.forms[0].elements[0].options[0] .....

I'd like to be able to programmatically navigate through the form
elements and then programmatically issue a POSTBACK to the server this
way.

Thank you,
Josh
 
B

Bruce Barker

W3C dom is for browsers or html parsers. Microsoft does not supply a HTML
parser for .net. the best they have is an interop wrapper around the IE web
control (which is a com wrapper around the mshtml com object).

you might look for one of the java libraries, and port it to .net (j#). also
you might look at unitASP which uses the .net control name approach.


-- bruce (sqlwork.com)
 
U

uv2003

Thanks, Bruce. I thought about doing that with a Java library, but I
thought that this must have been done somewhere. It seems common on
other platforms.

Josh
 
B

Bruce Barker

historically, on ms platforms, which were com-based, the mshtl control was
the best rendering engine. it has perfomance problems at server loads, but
has parsing, bitmap rendering and printing.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top