XML DOM and .NET's XML classes 
Author Message
 XML DOM and .NET's XML classes

I dont get why Microsoft created all these classes for
reading and writing xml.  What was wrong with the W3C's
interface for the DOM.  the DOM is easy and very
functional.  It seems like MS is just trying to make the
use of XML that much harder.


Wed, 22 Dec 2004 06:18:48 GMT  
 XML DOM and .NET's XML classes


Quote:
> I dont get why Microsoft created all these classes for
> reading and writing xml.  What was wrong with the W3C's
> interface for the DOM.  the DOM is easy and very
> functional.  It seems like MS is just trying to make the
> use of XML that much harder.

What is System.Xml.XmlDocument if not the DOM?

From .NET Framework SDK docus on XmlDocument class:

"This class implements the W3C Document Object Model (DOM)
 Level 1 Core and the Core DOM Level 2. The DOM is an
 in-memory (cache) tree representation of an XML document
 and enables the navigation and editing of this document."

-c



Wed, 22 Dec 2004 06:28:26 GMT  
 XML DOM and .NET's XML classes
I didnt mean to say that MS didnt implement the DOM, I
just dont understand why there are 30+ other xml classes
that basicly are wraper APIs around the DOM.  Why not just
use the DOM?
Quote:
>-----Original Message-----



>> I dont get why Microsoft created all these classes for
>> reading and writing xml.  What was wrong with the W3C's
>> interface for the DOM.  the DOM is easy and very
>> functional.  It seems like MS is just trying to make the
>> use of XML that much harder.

>What is System.Xml.XmlDocument if not the DOM?

>From .NET Framework SDK docus on XmlDocument class:

>"This class implements the W3C Document Object Model (DOM)
> Level 1 Core and the Core DOM Level 2. The DOM is an
> in-memory (cache) tree representation of an XML document
> and enables the navigation and editing of this document."

>-c

>.



Wed, 22 Dec 2004 06:37:36 GMT  
 XML DOM and .NET's XML classes

Quote:
> I didnt mean to say that MS didnt implement the DOM, I
> just dont understand why there are 30+ other xml classes
> that basicly are wraper APIs around the DOM.  Why not just
> use the DOM?

I used to ask the same question and now I can see a few reasons to use the
Readers and Writers.

As you already know, the DOM has serious performance issues on Large
documents, and why load up a huge document if you only need a few bits of
information.

The readers and writers give people a way to create a String of XML without
the use of an object.

At least the .Net objects will create Valid XML where if you are manually
hacking up XML by parsing strings, you may or may not even be creating valid
xml.

Depending on what you are doing, the DOM may not be the best solution.

--
Joe Feser
Fesersoft
http://www.fesersoft.com/
.Net, XML, XSLT, SQL
Free Code, Articles and Information.



Wed, 22 Dec 2004 06:53:49 GMT  
 XML DOM and .NET's XML classes
30 classes?

In System.Xml there are all the DOM-related classes
(one class for each type of element in XML), plus
a the Readers (5-6 classes). Total, there are probably
10 classes that don't relate to DOM, or do so
indirectly.

There are basically two ways of accessing an XML document.
Load the whole thing into RAM and use it with DOM (very
inefficient on large documents) or stream it as you go
(XmlTextReader). In other XML implementations you'd use
SAX for this, but MS has a reason why they think XmlReader
is superior. It's in the Framework SDK but I'm not
knowledgeable enough on it to discuss it intelligently.

Aside from that, there's System.Xml.Schema which is
all the XML-Schema required classes, there's XML
serialization which is necessary for Web Services/SOAP
among other things, there's System.Xml.XPath which is
used for XSL among a host of other uses, and finally
there's System.Xml.Xsl which is all the XSL stuff.

So, I don't see all these "extra" classes you're talking
about, everything seems neatly packaged to me.

-c


Quote:
> I didnt mean to say that MS didnt implement the DOM, I
> just dont understand why there are 30+ other xml classes
> that basicly are wraper APIs around the DOM.  Why not just
> use the DOM?

> >-----Original Message-----



> >> I dont get why Microsoft created all these classes for
> >> reading and writing xml.  What was wrong with the W3C's
> >> interface for the DOM.  the DOM is easy and very
> >> functional.  It seems like MS is just trying to make the
> >> use of XML that much harder.

> >What is System.Xml.XmlDocument if not the DOM?

> >From .NET Framework SDK docus on XmlDocument class:

> >"This class implements the W3C Document Object Model (DOM)
> > Level 1 Core and the Core DOM Level 2. The DOM is an
> > in-memory (cache) tree representation of an XML document
> > and enables the navigation and editing of this document."

> >-c

> >.



Wed, 22 Dec 2004 09:02:55 GMT  
 XML DOM and .NET's XML classes
You could ask the same question of other XML API's like SAX.

don


Quote:
> I didnt mean to say that MS didnt implement the DOM, I
> just dont understand why there are 30+ other xml classes
> that basicly are wraper APIs around the DOM.  Why not just
> use the DOM?

> >-----Original Message-----



> >> I dont get why Microsoft created all these classes for
> >> reading and writing xml.  What was wrong with the W3C's
> >> interface for the DOM.  the DOM is easy and very
> >> functional.  It seems like MS is just trying to make the
> >> use of XML that much harder.

> >What is System.Xml.XmlDocument if not the DOM?

> >From .NET Framework SDK docus on XmlDocument class:

> >"This class implements the W3C Document Object Model (DOM)
> > Level 1 Core and the Core DOM Level 2. The DOM is an
> > in-memory (cache) tree representation of an XML document
> > and enables the navigation and editing of this document."

> >-c

> >.



Wed, 22 Dec 2004 09:47:13 GMT  
 XML DOM and .NET's XML classes

Quote:
> You could ask the same question of other XML API's like SAX.

SAX is a parser API, not an document model API. May DOM implementations are
built on SAX, for example.

Peace,

Cameron Purdy
Tangosol, Inc.
.NET to J2EE porting service available




Fri, 31 Dec 2004 01:30:22 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. XML DOM via c#/.net

2. creating xml schema programmatically from an an xml file without using ADO.NET

3. XML.NET to XML.ADO26

4. DOM vs XML Namespace

5. XML DOM problem

6. XML DOM

7. Help request: IStream implementation for saving objects into XML DOM Documents

8. XML dom

9. XML DOM Problem

10. XML Dom error

11. MS XML DOM exceptions

12. XML dom

 

 
Powered by phpBB® Forum Software