Re: Dom C# binding

Philippe Le Hegaret wrote:

>On Thu, 2003-07-24 at 04:23, Jaspreet Singh wrote:
>  
>
>>	From where can i find a c# binding for the DOM idl. i just need the
>>interface so that i can provide my own implementation.
>>    
>>
>
>I don't think that there is a public c# binding for the DOM
>unfortunately.
>
>Philippe
>
>
>
>  
>
The .NET class library DOM implementation (System.Xml.XmlDocument etc) 
is defined using classes, not interfaces, so it is not possible to 
substitute change implementations at run-time ala JAXP.

The reasonable options for alternative DOM implementations are:

Use System.Xml source-code (but not binary) compatible definitions and 
have code be switchable by changing "using System.Xml" to "using 
Example.Xml" and recompiling.

Use J# to compile the W3C Java binding.  It may be possible to compile 
an existing Java parser that is JDK 1.1 compatible using J#.  Then you 
could switch between the ported parser and your implementation by 
changing a class factory.

If you are comfortable with XSLT, you can convert the XML source for the 
DOM definitions to make your own binding by developing your own mapping 
rules.  Each DOM spec has an XML source which embeds the interface 
definitions.  The DOM Test suite build process 
(http://www.w3.org/DOM/Test) extracts the interface definitions and 
produces files that contain all the interfaces for a specific level.  
Run the dom1-interfaces, dom2-interfaces or dom3-interfaces targets 
using Ant to produce the corresponding interface definition file.

Received on Friday, 25 July 2003 21:27:50 UTC