Domowe/Zadanie 5/sklep (1).xml

145 lines
3.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE shop
[
<!ELEMENT shop (departments)>
<!ELEMENT departments (department+)>
<!ELEMENT department (shelfs+)>
<!ATTLIST department domain CDATA #REQUIRED>
<!ELEMENT shelfs (shelf+)>
<!ELEMENT shelf (product+)>
<!ELEMENT product (name, price, country, expiry?)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT country (#PCDATA)>
<!ELEMENT expiry (#PCDATA)>
<!ATTLIST shelf domain CDATA #REQUIRED>
]>
<shop>
<departments>
<department domain="food">
<shelfs>
<shelf domain="vegetables">
<product>
<name>carrot</name>
<price>3,00</price>
<country>Poland</country>
</product>
<product>
<name>cucumber</name>
<price>3,50</price>
<country>Poland</country>
</product>
</shelf>
<shelf domain="fruits">
<product>
<name>apple</name>
<price>5,12</price>
<country>Poland</country>
</product>
<product>
<name>strawberry</name>
<price>10,00</price>
<country>Spain</country>
</product>
</shelf>
<shelf domain="dairy">
<product>
<name>milk</name>
<price>5,00</price>
<country>Poland</country>
<expiry>2018.12.27</expiry>
</product>
<product>
<name>yoghurt</name>
<price>3,50</price>
<country>Iceland</country>
<expiry>2018.12.27</expiry>
</product>
</shelf>
</shelfs>
</department>
<department domain="chemical">
<shelfs>
<shelf domain="teeth">
<product>
<name>toothpaste</name>
<price>6,00</price>
<country>Germany</country>
</product>
<product>
<name>liquid mouthwash</name>
<price>13,00</price>
<country>Germany</country>
</product>
</shelf>
<shelf domain="clothes">
<product>
<name>bleach</name>
<price>20,00</price>
<country>France</country>
</product>
<product>
<name>detergent</name>
<price>8,00</price>
<country>Poland</country>
</product>
<product>
<name>fabric softener</name>
<price>16,00</price>
<country>Germany</country>
</product>
</shelf>
</shelfs>
</department>
<department domain="clothes">
<shelfs>
<shelf domain="outerwear">
<product>
<name>t-shirt</name>
<price>45,00</price>
<country>Norway</country>
</product>
<product>
<name>sweater</name>
<price>80,00</price>
<country>Norway</country>
</product>
<product>
<name>hoodie</name>
<price>110,00</price>
<country>Norway</country>
</product>
</shelf>
<shelf domain="trousers">
<product>
<name>jeans</name>
<price>89,00</price>
<country>China</country>
</product>
<product>
<name>sweatpants</name>
<price>80,00</price>
<country>China</country>
</product>
</shelf>
<shelf domain="shoes">
<product>
<name>trainers</name>
<price>150,00</price>
<country>China</country>
</product>
<product>
<name>sports shoes</name>
<price>180,00</price>
<country>England</country>
</product>
<product>
<name>slippers</name>
<price>60,00</price>
<country>China</country>
</product>
</shelf>
</shelfs>
</department>
</departments>
</shop>