473,396 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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-Le...-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

Nov 19 '05 #1
3 1412
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)


"uv2003" <js*****@mindspring.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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-Le...-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

Nov 19 '05 #2
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

Nov 19 '05 #3
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)
"uv2003" <js*****@mindspring.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
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

Nov 19 '05 #4

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

Similar topics

11
by: Grant Edwards | last post by:
I've read over and over that Python leaves floating point issues up to the underlying platform. This seems to be largely true, but not always. My underlying platform (IA32 Linux) correctly...
2
by: John | last post by:
The following code works OK in IE 6.0 but does not work in Netscape 7. The image does not shift when one scrolls down but stays stationary in Netscape. Please help Thank you John function...
38
by: Martin Marcher | last post by:
Hi, I've read several questions and often the answer was 'C knows nothing about .' So if C knows that little as some people say, what are the benefits, I mean do other languages know more...
43
by: Minti | last post by:
Hi there everybody, I was just wondering that too many people choose to use language like Java because of its architecture independence, this AI is achieved because Java is as such a...
58
by: Larry David | last post by:
Ok, first of all, let's get the obvious stuff out of the way. I'm an idiot. So please indulge me for a moment. Consider it an act of "community service".... What does "64bit" mean to your friendly...
25
by: Peter Michaux | last post by:
Hi, I'm thinking about code minimization. I can think of a few places where whitespace matters a + ++b a++ + b a - --b a-- -b when a line ends without a semi-colon in which case the new...
55
by: Zytan | last post by:
I see that static is more restricted in C# than in C++. It appears usable only on classes and methods, and data members, but cannot be created within a method itself. Surely this is possible in...
11
by: tracy | last post by:
Hi, I really need help. I run this script and error message appeal as below: drop trigger log_errors_trig; drop trigger log_errors_trig ERROR at line 1: ORA04080: trigger 'LOG_ERRORS-TRIG'...
5
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.