Re: Faster XML Processing...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Derek Harmon (loresayer_at_msn.com)
Date: 03/06/04


Date: Sat, 6 Mar 2004 13:46:37 -0500


"Jon Skeet [C# MVP]" <skeet@pobox.com> wrote in message news:MPG.1ab39d52db61790798a331@msnews.microsoft.com...
> Why not just create a new XML document, try to load into that, and if
> that fails return the old one? Why try to load it into the original at
> all?

My observation is that it's not obvious that XmlNode's Clone( )
method is virtual, returning a polymorphic XmlNode, and that
XmlDocument IS-A XmlNode. If a programmer knows all three
facts and makes a connection between them to the problem,
then an effective solution is obvious.

On the other hand, many developers new to a class design and
driven by necessity will fallback into looking for a way to thunk
from XmlNode into the XmlDocument. The path many choose
(as being more obvious) is OuterXml.

In this specific respect, the XML DOM recommended by the
W3C is less intuitive compared to a model in which polymorphic
types are "in the developer's face." OOP languages make these
principles sublime in their subtlety, and less visible to the untrained
eye. Tools then must pick up the slack, but what tools can fit into
the developers workflow with continuity as they solve this problem?

The .NET Framework SDK documentation does well by listing
inherited members in subclass docs, and that helps (imagine
how unwieldy the docs for XmlValidatingReader or PropertyGrid
would be if the SDK didn't document inherited members).

Today, its an issue of developers having to gain experience with
the XML DOM object model, whereupon making the connections
I cite above comeabout naturally with time.

Although the learning curve will solve this for everybody in time,
it's still a good case for motivating the evolution of the object model,
language and tools as they enable more productive developers in
the future (that in turn drive greater ROI for the tasks given them
by their managers, who in turn have larger budgets with which to
purchase new tools).

Derek Harmon



Relevant Pages

  • Re: Parsing large amounts of data (200,000 entries) with XML?
    ... as is XML. ... object model to use the parser, but learning an object model is quite ... common amongst Visual Basic developers. ... We offer training sessions at work for new technologies as we accept ...
    (microsoft.public.vb.general.discussion)
  • Re: xmlfile load failed
    ... according to my xmlfile load function (it ... If you know the XML file ... and if you are running under VS then the current working directory is the ... it is not clear why you are casting this HRESULT to a bool and then doing the remarkably ...
    (microsoft.public.vc.mfc)
  • Stylus Studio and Raining Data Partner to Simplify XML Data Services
    ... Stylus Studio 6 XML Enterprise Edition Now Integrates with TigerLogic ... data integration, and Raining Data Corporation ... "Stylus Studio users are software architects and developers that need ...
    (comp.text.xml)
  • Re: problem with XML DOM load command
    ... with invalid XML and I'm getting suspicious that something in a QFE ... has busted MSXML and its exception processing. ... © 2003 Microsoft Corporation. ... >> So this exception is on your main thread where you're doing the load. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Word Searching XML
    ... which will be somewhat interactive and can not expected to load ... we are trying to search XML node and its ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.office.developer.com.add_ins)