Author Topic: Configure Standards via .NET  (Read 6012 times)

0 Members and 1 Guest are viewing this topic.

BlackBox

  • King Gator
  • Posts: 3770
Re: Configure Standards via .NET
« Reply #15 on: September 24, 2012, 11:19:55 AM »
As always, I greatly appreciate the clarification/education, dgorsman.  :-)
"How we think determines what we do, and what we do determines what we get."

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Re: Configure Standards via .NET
« Reply #16 on: September 24, 2012, 01:18:10 PM »
Interesting discussion.

I am curious to know why though, so many choose to employ .XML?

I was directed to use this for my night job a while back for a development project... According to this (albeit older) material from CodeProject, .XML is slower than both Registry, and .INI, and only faster than .Config.

If you use XML, then you can:

1. To check your data (XML file) for correct structure and a contain. You can do it via your XSD schema.
2. To display your XML data as any format, for example: html, pdf, svg, csv, e.t.c. You can do it via your XSLT files.
3. To manage XML data - this is very simple via LINQ to XML.

Look example:
Download and unpack the attached file. This plugin was wrote by Alexander Rivilis, and I packaged it in my "AutoCAD plugin XML template". In this example I am using XML + XSLT + XSD. XSLT and XSD it is XML too :).

Open readme.html in NOTEPAD.EXE program. You will see this:

Quote
<!DOCTYPE HTML PUBLIC "-//W3C//DTD/HTML 4.01 frameset//EN"
"http://www.w3.org/TR/HTML4.01/frameset.dtd">
<html>
   <head><title>readme</title></head>
   <frameset rows="80,*" border="5" bordercolor="red" >
      <frame name="frTitle" src="./settings/info/ReadMeHeader.xml"
      scrolling="no" noresize="noresize" />
      <frameset cols="200,*" border="5" frameborder="1">
         <frame name="frContents" src="./settings/info/content.xml"/>
         <frame name="frDocument" src="./settings/info/appinfo.xml"/>
      </frameset>
   </frameset>
</html>

You can see the different XML files, which are used like data for this HTML file. Now open readme.html in Internet Explorer, or Opera browser. You will see clear documentation about this AutoCAD plugin.

Notes: You can open readme.html file in Google Chrome too, but with --allow-file-access-from-files option only. Firefox displayed incorrect the formating of this files.

The XML using allowed to me to manage all AutoCAD plugins in my company. And I do it not manually, but program. The old video by this theme you can see here, I apologize, but this video on Russian language only.

Then my special program works with such "XML wrapped" plugins and controls their autoload to AutoCAD (any versions). It is convenient for me and my users:





XML provides me actual dynamic help for all AutoCAD plugins, and gave to me keywords for the search. The XML is very convenient and gives many possibilities. All that I showed, I made by means of XML. These are my old example, but it is possible to understand the main sense of use of XML.

=========
P.S. I apologise for my bad English.

Regards
« Last Edit: September 24, 2012, 02:34:20 PM by Andrey »

BlackBox

  • King Gator
  • Posts: 3770
Re: Configure Standards via .NET
« Reply #17 on: September 24, 2012, 04:04:55 PM »
P.S. I apologise for my bad English.

No worries; your English is superior to my Russian.  ;-)

Thank you for your generous reply, I will look over the material you posted.
"How we think determines what we do, and what we do determines what we get."