Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML and SVG from PQL By Dave Doulton Computing Services University of Southampton.

Similar presentations


Presentation on theme: "XML and SVG from PQL By Dave Doulton Computing Services University of Southampton."— Presentation transcript:

1 XML and SVG from PQL By Dave Doulton Computing Services University of Southampton

2 XML and SVG This presentation only covers a very small but usable subset of what can be done with XML and SVG. Further details available from Professional XML 2 nd Edition (Wrox) 1267 pages.

3 Outline What is XML? What use is it? How do I generate it? What is SVG? How do I generate it?

4 What is XML XML is eXtensible Markup Language It is a way of marking up data to impose some structure. It is hierarchical in nature and uses tags similar to HTML

5 What is XML Basically data is divided up in a tree structure with tags defining the levels in the tree. There must be one root to the tree. An example of an outline tree for the company database would be

6 Example XML

7 Where does the data go? Each of the sub levels can have attributes or further sublevels. Each sublevel must be uniquely named or have a unique set of attributes. So for the case level there must be an attribute as there is more than 1 case.

8 Example data John D Jones 1 …. Etc

9 An alternative

10 An alternative if there is no data between tags, the opening tag can be closed with a /> instead

11 What use is it? It is an advancement on other data interchange methods as there are no problems associated with parsing it. With comma delimited there are problems with commas and quotes in the data and also with missing columns.

12 What use is it? Due to the syntax the only problems can be with & ‘ and “ These are replaced in data with > < & &apos; and " All data is treated as text.

13 What use is it? Given the scope of the syntax there are more and more tools becoming available to use XML. So it becomes a natural means for exporting and importing data between programs. As we shall see even between SIR and the web browser and plugins in the web browser.

14 What use is it? To use it effectively there needs to be something to read it and manipulate it. One such application is XSL (eXtensible Style Language) Another is SVG (Scalable Vector Graphics)

15 What use is it? See http://www.soton.ac.uk/~sug/conf2002/xsldemo.html Some of the content is an example from Microsoft ™ of varying the style for the same content.

16 How do I generate it? To generate XML you basically just write text to a file. However there is the need for some extra XML to state that the content is XML. In PQL there is the added problem of XML looking like global variables.

17 How do I generate it? A simple way to generate it in PQL is to write the start and end of the tag separately Write ‘ ’ Or write [‘ ’]

18 What is SVG? SVG is Scalable Vector Graphics. It is an xml document that contains data that is a set of drawing instructions. When viewed with an svgviewer plugin it produces scalable drawings. These can be text, graphs or diagrams.

19 What is SVG? It can also be used with CSS or cascading style sheets to control aspects of the display. See http://www.soton.ac.uk/~sug/conf2002/svgdemo.html http://www.soton.ac.uk/~sug/conf2002/svgdemo.html Get the SVG plugin from http://www.adobe.com/svg/viewer/install/main.html http://www.adobe.com/svg/viewer/install/main.html

20 Conclusion XML and SVG are relatively easy to use. They allow useful data display and/or transfer capabilities. Well worth investigating.


Download ppt "XML and SVG from PQL By Dave Doulton Computing Services University of Southampton."

Similar presentations


Ads by Google