Zdeněk Žabokrtský & Rudolf Rosa
{zabokrtsky,rosa}@ufal.mff.cuni.cz
Tuesday 9.00–11.20
SU2
<firm id="bsi001"> <name>Boot & Shoe Inc.</name> <address> <street>246 Walker Drive</street> <town>Lacetown</town> <state>OH</state> <zipcode>44312</zipcode> <phone>732754689</phone> </address> <specialization> Shoemaking, cobler and cordwainer work: shoes, boots, sandals, clogs and moccasins. </specialization> </firm>
Resources: http://www.kosek.cz
Surname | Firstname | Phone | |
---|---|---|---|
Smith | John | jsmith@gmail.com | 2554119897 |
Walker | David | dwalk@hotmail.com | 8446225653 |
<addressbook> <person> <surname>Smith</surname> <firstname>John</firstname> <email>jsmith@gmail.com</email> <phone>2554119897</phone> </person> <person> <surname>Walker</surname> <firstname>David</firstname> <email>dwalk@hotmail.com</email> <phone>8446225653</phone> </person> </addressbook>
|
XML document can (should) contain instructions for xml processor
Declaration header XML:
<?xml version="1.0" encoding="utf-8" ?>
Document type declaration:
<!DOCTYPE MojeKniha SYSTEM "MojeKniha.DTD">
<!-- Here be dragons -->
(not allowed inside tags, cannot contain --)
the document conforming all syntactic requirements
<!ELEMENT emph (#PCDATA|sub|super)* >
<!ATTLIST author firstname CDATA surname CDATA>
<!ELEMENT collection (description,recipe*)> <!ELEMENT description ANY> <!ELEMENT recipe (title,ingredient*,preparation,comment?,nutrition)> <!ELEMENT title (#PCDATA)> <!ELEMENT ingredient (ingredient*,preparation)?> <!ATTLIST ingredient name CDATA #REQUIRED amount CDATA #IMPLIED unit CDATA #IMPLIED> <!ELEMENT preparation (step*)> <!ELEMENT step (#PCDATA)> <!ELEMENT comment (#PCDATA)> <!ELEMENT nutrition EMPTY> <!ATTLIST nutrition protein CDATA #REQUIRED carbohydrates CDATA #REQUIRED fat CDATA #REQUIRED calories CDATA #REQUIRED alcohol CDATA #IMPLIED>
xmllint (distributed with libxml)
NPFL092 | Lecture 9 |