The CSS File

Visual Basic User's Guide > XML Basics

In line 2 of the XML file (above), you can see a reference to a stylesheet file called address.css. This CSS file tells Text Control that an address entry should be displayed as a table, and that the individual elements are table cells, having a 1 pixel wide border and a font size of 1 point:

address { display: table }
address_record { display: table-row}
name, street, city, email {	display: table-cell; border: 1px; font-size: 11pt }

When you load address.xml with the sample program, Text Control will display it according to this stylesheet.

Changing the CSS file can make the text appear in a completely different way. For instance, a list can be used instead of a table, as in this example:

name {	display: block; font-size: 14pt; color: blue }
street, city, email { display: list-item; font-size: 11pt}

This is how Text Control will display the XML data using the new sylesheet: