This paper describes the use of extensible markup language (XML) for electronic clinical communications in Scotland. It gives the results of the first UK project to send and receive discharge letters using XML. This pilot had the advantage of transferring readable clinical information between computer systems and giving the receiving GP choice of decoding and saving clinical and administrative data into his practice system. A number of existing clinical systems and a variety of written documents were studied. Existing trial standards, including the NHS EDIFACT, HL7v2 and CEN standard ENV 13606 were taken into consideration. The project worked with the receiving GP system supplier, GPASS, and the NHS Scotland Information and Statistics Division in defining the document type definition (DTD) for the pilot DTD. GPASS undertook production of a module for their system to parse the XML messages into the patient record on the GP system. The system allows the GP to read and print the original document and modify the content prior to storing in the practice system. SMTP e-mail messages were used for the pilot. Resulting messages were parsed into the GP system and validated by a variety of GP users. Currently there is a large scale program to develop XML Schema and web browser based communications of referrals, discharge and laboratory orders and reports.