Labs and Homework

Diana_05
Lab_Hw12.pdf

Lab and Homework 12 4/28/2021

Lab12: The following is a given XML code <?xml version="1.0" encoding="UTF-8"?> <book> <title>Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book>

title, author, year, price must be in order. Write a xsd code and give them the specific type and then run online

http://www.utilities-online.info/xsdvalidation/#.Wtd1j4jwZPY show validity which similar to the following

Hw 12: The following is a given XML code where person can have multiple times and person may not have a “children”. If there is a “children” then children can have at least two <childname>. Write a xsd code and then run online for the code1 and code2 by using the xsd code as requested in the problem.

http://www.utilities-online.info/xsdvalidation/#.Wtd1j4jwZPY show validity which similar to the following

Code1:

<?xml version="1.0" encoding="UTF-8"?>

<persons>

<person>

<firstname>John</firstname>

<lastname>Smith</lastname>

<children>

<childname>Cecilie</childname>

</children>

</person>

<person>

<firstname>Stale</firstname>

<lastname>Refsnes</lastname>

</person>

</persons>

Code2:

<?xml version="1.0" encoding="UTF-8"?>

<persons>

<person>

<firstname>John</firstname>

<lastname>Smith</lastname>

<children>

<childname>Cecilie</childname>

<childname>Mary</childname>

</children>

</person>

<person>

<firstname>Stale</firstname>

<lastname>Refsnes</lastname>

</person>

</persons>