XML BASICS and more…
What is XML? In common: XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed with relatively little human intervention and exchanged across diverse hardware, operating systems, and applications
What is XML?? stands for EXtensible Markup Language is a markup language much like HTML was designed to describe data tags are not predefined you must define your own tags uses a Document Type Definition (DTD) or an XML Schema to describe the data
Differences between HTML & XML It's quite similar to HTML 2 fundamental differences Separation of form and content Tags define structure and content of the data Form defined in a style sheet (XSL) XML is extensible HTML Tags defined by W3C In XML everyone can define his own tags
What does it look like? Steffen D Christiane Reminder Don't forget me this weekend!
What does it do? Nothing! Note with a header and message body Has a sender and a receiver Just pure information wrapped in XML Tags Software is needed to send, receive or read it
What does it mean? The XML declaration should always be included defines the XML version of the document the first element of the document (root element)
What does it mean?? Steffen D Christiane Reminder Don't forget me this weekend! 4 child elements of the root (to, from, heading, and body) end of the root element
What rules to obey! In XML all elements must have a closing tag Except elements must be properly nested XML tags are case sensitive All documents must have a single tag pair to define the root element
What rules to obey!! Children are nested within root attribute values Provide additional information about elements Put single or double quotes around Don’t use them too often
Produce VALID XML Define set of rules Apply to all tags in your XML language most common way is to use a DTD (Document Type Definition) document that follows all of the rules for that language is called valid
Document Type Definition (DTD) define what kind of data each element will consist of method is borrowed from SGML and has its own specific language and syntax controls the syntax and semantics of an XML file
Document Type Definition ((DTD)) Specifying the sequence in which elements appear Specifying the number of times an element can appear ( +,*,?,nothing) type of data an item can hold CDATA - any character also HTML
Conclusion if a document follows all rules it is well formed documents are required to be well-formed offers widely adopted way of representing text and data can be processed easily perfect to store and exchange data easy to read and understand
the end Thank you for your attention Any questions?
Resources World Wide Web Consortium (W3C) W3Schools UC Computing & Communications Software AG