Copyright © 2010 Silmaril Consultants
Rev: 2010-03-01T00:19:00+0000

C and Java are for writing programs; XML is for storing text.A.13  What is the difference between XML and C or C++ or Java?

C and C++ (and other languages like FORTRAN, or Pascal, or Visual Basic, or Java or hundreds more) are programming languages with which you specify calculations, actions, and decisions to be carried out in order:

mod curconfig[if left(date,6) = "01-Apr", 
    t.put "April Fool!", 
    f.put days('31102005','DDMMYYYY') -
          days(sdate,'DDMMYYYY')
    " more shopping days to Samhain"];
	  

XML is a markup specification language with which you can design ways of describing information (text or data), usually for storage, transmission, or processing by a program. It says nothing about what you should do with the data (although your choice of element names may hint at what they are for):

<part num="DA42" models="LS AR DF HG KJ" 
 update="2001-11-22">
  <name>Camshaft end bearing retention circlip</name>
  <image drawing="RR98-dh37" type="SVG" x="476" 
   y="226"/>
  <maker id="RQ778">Ringtown Fasteners Ltd</maker>
  <notes>Angle-nosed insertion tool <tool 
         id="GH25"/> is required for the removal 
         and replacement of this part.</notes>
</part>
	  

On its own, an SGML or XML file (including HTML) doesn't do anything. It's a data format which just sits there until you run a program which does something with it. See also the question about how to run or execute XML files.