10
XML, SCHEMAS, DTD The primer Brendan Knight

XML, SCHEMAS, DTD The primer Brendan Knight. XML XML stands for eXtensible Markup Language. XML is designed to transport and store data. Contains

Embed Size (px)

Citation preview

Page 1: XML, SCHEMAS, DTD The primer Brendan Knight. XML  XML stands for eXtensible Markup Language.  XML is designed to transport and store data.  Contains

XML, SCHEMAS, DTDThe primerBrendan Knight

Page 2: XML, SCHEMAS, DTD The primer Brendan Knight. XML  XML stands for eXtensible Markup Language.  XML is designed to transport and store data.  Contains

XML

XML stands for eXtensible Markup Language.XML is designed to transport and store data.Contains elements: An element can contain: other elements text attributes or a mix of all of the above...

Page 3: XML, SCHEMAS, DTD The primer Brendan Knight. XML  XML stands for eXtensible Markup Language.  XML is designed to transport and store data.  Contains

SCHEMAS

An XML schema describes the structure of an XML document.The XML Schema language is also referred to as XML Schema Definition (XSD).We can also use a DTD

Page 4: XML, SCHEMAS, DTD The primer Brendan Knight. XML  XML stands for eXtensible Markup Language.  XML is designed to transport and store data.  Contains

DTDA Document Type Definition (DTD) defines the legal building blocks of an XML document. It defines the document structure with a list of legal elements and attributes.A DTD can be declared inline inside an XML document, or as an external reference.

Page 5: XML, SCHEMAS, DTD The primer Brendan Knight. XML  XML stands for eXtensible Markup Language.  XML is designed to transport and store data.  Contains

XML and CSSWe can display our XML using cascading style sheets.These dictate the LOOK of the data displayCSS is not the only way we can do this

Page 6: XML, SCHEMAS, DTD The primer Brendan Knight. XML  XML stands for eXtensible Markup Language.  XML is designed to transport and store data.  Contains

Example XML <?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/css" href="cd_catalog.css"?><CATALOG>  <CD>    <TITLE>Empire Burlesque</TITLE>    <ARTIST>Bob Dylan</ARTIST>    <COUNTRY>USA</COUNTRY>    <COMPANY>Columbia</COMPANY>    <PRICE>10.90</PRICE>    <YEAR>1985</YEAR>  </CD>

Page 7: XML, SCHEMAS, DTD The primer Brendan Knight. XML  XML stands for eXtensible Markup Language.  XML is designed to transport and store data.  Contains

Apply this cssCATALOG{background-color: #ffffff;width: 100%;}CD{display: block;margin-bottom: 30pt;margin-left: 0;}TITLE{color: #FF0000;font-size: 20pt;}ARTIST{color: #0000FF;font-size: 20pt;}COUNTRY,PRICE,YEAR,COMPANY{display: block;color: #000000;margin-left: 20pt;}

Page 8: XML, SCHEMAS, DTD The primer Brendan Knight. XML  XML stands for eXtensible Markup Language.  XML is designed to transport and store data.  Contains

All togetherEmpire Burlesque Bob DylanUSA

Columbia

10.90

1985

Page 9: XML, SCHEMAS, DTD The primer Brendan Knight. XML  XML stands for eXtensible Markup Language.  XML is designed to transport and store data.  Contains

XML, SCHEMAS, DTDBrendan Knight

Page 10: XML, SCHEMAS, DTD The primer Brendan Knight. XML  XML stands for eXtensible Markup Language.  XML is designed to transport and store data.  Contains

XML, SCHEMAS, DTDReference :Displaying xml using csshttp://www.w3schools.com/xml/xml_display.asp You can check your xml at http://www.w3schools.com/xml/xml_validator.asp

Tutorial is at http://www.w3schools.com/xml/ please do it