473,396 Members | 2,061 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.

HTML 4.01 / XHTML implementation of the DOM

Hi, got a few questions:

- Does anyone know a HTML 4.01 / XHTML implementation of the DOM, or is
only System.Xml (XML 1.0 and 2.0 only AFAIK) avaiable?
- Any ideas if .NET 2.0 will have?

Is it possible to "load" the DTD specification for HTML 4.01 / XHTML
using the System.Xml namespace or am I just dreaming?

Edgardo
Nov 12 '05 #1
4 2455
* Edgardo Rossetto wrote in microsoft.public.dotnet.xml:
- Does anyone know a HTML 4.01 / XHTML implementation of the DOM, or is
only System.Xml (XML 1.0 and 2.0 only AFAIK) avaiable?
XHTML 1.0/1.1/Basic/Print documents are required to be XML 1.0 documents
so you can use any XML processor for those; HTML 4.01 is not supported
by the .NET Framework, but there are external parsers available, see the
archive of this newsgroup; System.Xml implements various DOM levels and
features, though it uses different language bindings, e.g., overloading
is used which is avoided in the W3C specifications as not all languages
support overloading. DOM Level 2 HTML is not supported by the Framework
except for the System.Web.UI.HtmlControls namespace. There is no XML 2.0
the W3C only specified XML 1.0 and XML 1.1, the framework supports XML
1.0 only.
Is it possible to "load" the DTD specification for HTML 4.01 / XHTML
using the System.Xml namespace or am I just dreaming?


XHTML DTDs are XML DTDs and System.Xml supports XML DTDs e.g. for
validation; HTML DTDs are not supported, but external tools exist that
might offer the functionality you are looking for.
--
Björn Höhrmann · mailto:bj****@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Nov 12 '05 #2


Edgardo Rossetto wrote:

- Does anyone know a HTML 4.01 / XHTML implementation of the DOM, or is
only System.Xml (XML 1.0 and 2.0 only AFAIK) avaiable?
If you are asking about the W3C DOM Level 1 or Level 2 HTML, no, at
least the classes provided by MS as the .NET SDK do not implement that,
I have never looked for third party implementations in .NET so I don't
know about that.
As for .NET's System.Xml and the W3C DOM standards, I think W3C DOM
Level 1 XML, W3C DOM Level 2 Core and XML are there, but as already
explained making use of overloading for instance which the .NET
framework supports while the W3C DOM has avoided it to allow bindings to
script languages like JavaScript(ECMAScript), and with some other
deviations (nodeValue in the W3C DOM is Value in the .NET SDK).
W3C DOM Level 2 mutation events also have some counterpart in the .NET
SDK with the NodeChanged, NodeChanging, NodeInserted, NodeRemoved etc
events the XmlDocument has.
Is it possible to "load" the DTD specification for HTML 4.01 / XHTML
using the System.Xml namespace or am I just dreaming?


The XHTML DTDs are XML DTDs so System.Xml should be able to handle them.
There are also schemas for XHTML which System.Xml with its schema
support should be able to handle.
For reading HTML there is SgmlReader:
<http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B90FDDCE-E60D-43F8-A5C4-C3BD760564BC>
You can use that to read in HTML (valid and "tag soup" as found on the
web) and then for instance create a .NET XmlDocument.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 12 '05 #3
Bjoern Hoehrmann wrote:
XHTML 1.0/1.1/Basic/Print documents are required to be XML 1.0 documents
so you can use any XML processor for those; HTML 4.01 is not supported
by the .NET Framework, but there are external parsers available, see the
archive of this newsgroup; System.Xml implements various DOM levels and


Could you pase some urls of these parsers please? anyone free or open
source?

thanks a lot for the clarifications

Edgardo
Nov 12 '05 #4
* Edgardo Rossetto wrote in microsoft.public.dotnet.xml:
XHTML 1.0/1.1/Basic/Print documents are required to be XML 1.0 documents
so you can use any XML processor for those; HTML 4.01 is not supported
by the .NET Framework, but there are external parsers available, see the
archive of this newsgroup; System.Xml implements various DOM levels and


Could you pase some urls of these parsers please? anyone free or open
source?


Martin mentioned one, there are several .NET wrappers for HTML Tidy,
e.g. http://sourceforge.net/projects/ntidy/ and various parsers for
the Java programming language which you should be able to use through
either J# or the Java to C# Converter.

http://www.google.com/search?q=html+parser+c%23

has details.
--
Björn Höhrmann · mailto:bj****@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Nov 12 '05 #5

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

Similar topics

8
by: Moosebumps | last post by:
Is there a standard solution for writing HTML web pages with Python? I don't know that much about web programming, but basically I want to generate some internal reports on a web page. It...
6
by: Horst Gutmann | last post by:
Hi :-) I currently have quite a big problem with minidom and special chars (for example &uuml;) in HTML. Let's say I have following input file:...
20
by: John Bokma | last post by:
Hi, I converted most (not all) of my pages at http://johnbokma.com/ to XHTML. I thought this was just a small change from 4.01. However someone stated quite vaguely that my pages are *not*...
47
by: Chuck | last post by:
Is there any logical reason why one should convert if css is already being used? What possible, immediate, benefit would there be? I am at a loss to see what, pragmatic, difference it would make.
7
by: VK | last post by:
Is it possible to include SVG object right onto HTML page in Firefox 1.5? (I mean native SVG, not SVG plugin) .... <svg> .... </svg> All samples on mozilla.org are either stay-alone .svg...
16
by: selvadealma | last post by:
Please excuse my newbie-ness. I am pretty familiar with basic html, though somewhat rusty, but want to break out of the basics and start acquiring a legitimate understanding of design so as not to...
2
by: aglaforge | last post by:
I'm attempting to write a quick piece of Javascript code that will validate if the end user of the javascript has the necessary VML attributes set in their HTML. The problem in IE is that...
6
by: Guy Macon | last post by:
cwdjrxyz wrote: HTML 5 has solved the above probem. See the following web page: HTML 5, one vocabulary, two serializations http://www.w3.org/QA/2008/01/html5-is-html-and-xml.html
6
by: Aaron Gray | last post by:
Hi, I am working on an HTML WYSISYG Wiki and need to display a diff page like WikiPedia does if two people edit a file at the same time to give the second user the diff. Basically with additions...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
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,...
0
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...

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.