(Nutrition Information XML Document) Create an XML document that marks up the nu
ID: 672582 • Letter: #
Question
(Nutrition Information XML Document) Create an XML document that marks up the nutrition facts for a package of Grandma White's cookies. A package of cookies has a serving size of 1 package and the following nutritional value per serving: 260 calories, 100 fat calories, 11 grams of fat, 2 grams of saturated fat, 5 milligrams of cholesterol, 210 milligrams of sodium, 36 grams of total carbohydrates, 2 grams of fiber, 15 grams of sugars and 5 grams of protein. Name this document nutrition.xml. Load the XML document into your web browser. [HINT: your markup should contain elements describing the name, serving size/amount, calories, sodium, cholesterol, proteins, etc. Mark up each nutrition fact/ingredient listed above.]
Explanation / Answer
<?xml version="1.0" encoding="utf-8"?>
<!-- Exercise 14.7 -->
<!-- Nutrition Facts -->
<product name = "Grandma White's Cookies">
<servingsize>1 package</servingsize>
<calories>
<total>260 Calories</total>
<fat>100 Calories</fat>
</calories>
<fat>
<total>11 grams</total>
<saturated>2 grams</saturated>
</fat>
<cholesterol>5 milligrams</cholesterol>
<sodium>210 milligrams</sodium>
<carbohydrates>
<total>36 grams</total>
<fiber>2 grams</fiber>
<sugars>15 grams</sugars>
</carbohydrates>
<protein>5 grams</protein>
</product>
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.