The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,766 other followers

Archive for June 18th, 2019

Switching Delphi XML DOM vendors

Posted by jpluimers on 2019/06/18

I thought I had written a blog article on switching DOM vendors before, but in retrospect that was a conference presentation somewhere in 2011: https://github.com/jpluimers/Conferences/tree/master/2011/EKON15-Renaissance-Hotel-D%C3%BCsseldorf/Delphi-XE2-and-XML

I mentioned some of the materials at [WayBack] delphi – Reading distinct values from XML using XPath – Stack Overflow.

It was back in the days I worked for better office, Gwan Tan was still alive and CodePlex was still a thing. Now the code is at [WayBack] bo library – CodePlex Archive: An archive of the CodePlex open source hosting site.

Some recovered bits are at https://gist.github.com/jpluimers/98dcec944538fd6986fd2d51f7a79d8b#file-mainformunit-pas that shows the selection process of a TDOMVendor, how to log its capabilities and how to use it all in the method procedure TMainForm.LogDomVendor(const CurrentDomVendor: TDOMVendor);

Hopefully one day I can resurrect the code one day…

Over the years, the vendor list has not changed much [WayBack] Using the Document Object Model – RAD Studio documents these vendors.

Compared to Delphi 2007 and earlier, OmniXML has gone and ADOM has entered.

On the MSXML side, you can change which version you use too, as explained in Quick tip: using MSXML v6 with TXMLDocument in D7-D2007 – DelphiFeeds.com with the original article at [WayBackQuick tip: using MSXML v6 with TXMLDocument in D7-D2007 | Delphi Haven.

Basically he overwrites MSXMLDOMDocumentCreate with a method creating the right MSXML DOM document. That has now been deprecated as [WayBack] Xml.Win.msxmldom.MSXMLDOMDocumentCreate – RAD Studio API Documentation now points to [WayBack] Xml.Win.msxmldom.TMSXMLDOMDocumentFactory.CreateDOMDocument – RAD Studio API Documentation.

List of Built-in XML Vendors

The following table shows a comparison of the XML vendors that RAD Studio supports by default:

Implementation Unit Global Variable Description
MSXML Xml.Win.msxmldom SMSXML Fastest of the built-in RAD Studio XML vendors. Windows only. Default.

For cross-platform support, you must choose a different XML vendor. If you do not specify a different XML vendor, your application does not have XML support on other platforms than Windows, and you see a run-time exception when you run your application in other platforms.

OmniXML Xml.omnixmldom sOmniXmlVendor Much faster than ADOM, but slightly slower than MSXML. Cross-platform.
ADOM Xml.adomxmldom sAdom4XmlVendor Slower than the other built-in RAD Studio XML vendors. Cross-platform.

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Software Development | Leave a Comment »

Because FTDI history: Why is the atmega chip reset three times during programming? – Arduino Stack Exchange

Posted by jpluimers on 2019/06/18

For historic reference: [WayBackWhy is the atmega chip reset three times during programming? – Arduino Stack Exchange.

TL;DR:

It is to ensure the device is being reset, no matter which driver you use and how odd that driver behaves.

So what you are seeing there is

  1. first a brief toggle of DTR by the IDE to force a reset,
  2. then avrdudeopening the port and DTR going low,
  3. then finally the IDE toggling DTR again one last time to force a final reset.

–jeroen

Posted in Development, Hardware Development | Leave a Comment »

Desktop Duplication API in Delphi – CodeProject

Posted by jpluimers on 2019/06/18

Cool stuff: [WayBackDesktop Duplication API in Delphi – CodeProject.

It is based on:

There is also a GitHub repository: Delphi/DesktopDuplicationAPI at master · tothpaul/Delphi

Via: [WayBack] Little demo for the Desktop Duplication API  – Paul TOTH – Google+

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

 
%d bloggers like this: