Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <recipe version="1.0" encoding="ISO-8859-1">
- Here's the root element. It's not called html, it's called
- recipe, since this is the XML for a recipe. Notice it has some extra
- attributes in it, which you've never seen on an html element in HTML.
- <name>Head First Lounge Iced Tea</name>
- Wow, look at these tags. The h1 and p are all gone, and instead we've got
- recipe, name, description, ingredients,
- preparation, and so on.
- Just by looking at the element names you can tell this is a recipe.
- <description>A brisk iced tea with a bit of a kick. We
- serve this all day long.
- </description>
- <ingredients>
- <ingredient measurement="6 cups">water</ingredient>
- <ingredient measurement="2 bags">black tea</ingredient>
- <ingredient measurement="2 bags">earl grey tea</ingredient>
- <ingredient measurement="6 cups">ice</ingredient>
- </ingredients>
- <preparation>
- <time duration="10 minutes" /> This empty element
- looks a little strange. We'll come back to that in a bit.
- <step>Boil one cup of water in a pan, remove pan, and
- add tea. Let steep for five minutes.</step>
- <step>Add ice to a pitcher, then add tea,
- then 5 cups cold water.</step>
- <step>Mix well and serve. Give tea a
- quick shake in a shaker for an
- extra touch.</step> Other
- than the element names, the way the elements look and are used is just like HTML (opening
- tags, closing tags, and so on).
- </preparation>
- </recipe>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement