XML Introduction![]() XML, Extensible Markup Language, is a simlified subset of SGML, Standard Generalized Markup Language. XML coded files are extensively used to transport information between applications on he Internet. The project.xml file contains a high level 'hierachical structure' describing of a project. The XML files must be well-formed (e.g. always start and end-tags). A valid document should also have a Document Type Definition, DTD, and follow the grammar established by the DTD. We can now display the project.xml file by adding information about how the different elements in the file shall be presented in the Internet-browser. This can be done in two ways
<?xml-stylesheet type="text/css" href="project_overall.css" ?> By using XSL documents (which by the way are XML documents) it is possible to format the output, add new elements and choose what elements that are to be included in the generated document. In this short example the 'project.xml' file has the header <?xml-stylesheet type="text/xsl" href="a_project_overall.xsl" ?> The DTD forms the vocabulary of the XML document can be used to control that a XML document contains defined elements, and the structure of them (including e.g. if they can be repeated such as the Space element in our 'project.xml' file). The XSL document can except format output to any desired document type also be used to transform XML documents to any desired structure (and thus eventually also defining new DTDs). Looking at the figure above we can envision how different applications within or between companies can use XML documents to exchange structured and valid data. Further reading
|