home *** CD-ROM | disk | FTP | other *** search
Text File | 2002-08-13 | 1.6 KB | 88 lines | [TEXT/hscd] |
- XML for beginners
-
-
- Let's see what some XML looks like.
-
- <entry>
- <name>
- <firstname>Peter</firstname>
- <lastname>Spurling</lastname>
- </name>
- <address>
- <address_line1>42 Exmouth Street</address_line1>
- <address_line2>Stoke Newington</address_line2>
- <address_line3>London</address_line3>
- <postcode>N17 8JQ</postcode>
- </address>
- </entry>
-
-
-
- <?xml version="1.0" standalone="no"?>
- <!DOCTYPE entry SYSTEM "clients.dtd">
- <?xml:stylesheet type="/text/xsl" href="Clientlist.xsl"?>
- <entry>
- <name>
- <firstname>Peter</firstname>
- <lastname>Spurling</lastname>
- </name>
- <address>
- <address_line1>42 Exmouth Street</address_line1>
- <address_line2>Stoke Newington</address_line2>
- <address_line3>London</address_line3>
- <postcode>N17 8JQ</postcode>
- </address>
- </entry>
-
-
-
- Here's our half-built stylesheet:
-
- $DOCUMENT {
- font-size: 12pt;
- margin-top: 5px;
- margin-left: 10px;
- }
- * {
- display: block;
- background-color: white;
- padding: 2px;
-
- grapes {
- color : #000000;
- }
-
-
- Finally let's complete our stylesheet by adding CSS instructions for all the tags.
-
- $DOCUMENT {
- font-size: 12pt;
- margin-top: 5px;
- margin-left: 10px;
- }
- * {
- display: block;
- background-color: white;
- padding: 2px;
-
- grapes {
- color : white;
- }
-
- reds {
- background-color: yellow;
- font-family : verdana, helvetica;
- color : red;
- border : solid 5px;
- border-color : red;
- }
-
- whites {
- background-color: gray;
- font-family : verdana, helvetica;
- color : white;
- border : solid 5px;
- border-color : yellow;
- }
-
-