XML:Creating XML Document Using CSS

Friday 24 February 2012
Step 1:
First Create XML File And Name It As Second.XML
<?xml version="1.0" encoding="utf-8"?>
<?xml:stylesheet type="text/css" href="Second.css"?>
<PRODUCTDATA>
    <PRODUCT PRODID="P001"  CATEGORY="TOY">
        <PRODUCTNAME>Mini Bus</PRODUCTNAME>
        <DESCRIPTION>This is a toy for children aged 4 and above</DESCRIPTION>
        <PRICE>75</PRICE>
        <QUANTITY>54</QUANTITY>
    </PRODUCT>

    <PRODUCT PRODID="P002"  CATEGORY="TOY">
        <PRODUCTNAME>Barbie Doll</PRODUCTNAME>
        <Description>This is a toy for children age group of 5-10</Description>
        <Price>20</Price>
        <Quantity>200</Quantity>
    </PRODUCT>
   
</PRODUCTDATA>



Step 2:
Then Create CSS File And Name It As Second.css
PRODUCTNAME
{
font-family=Arial;
font-size=20pt;
font-weight:bold;
color:red;
display:block;
padding-top:6pt;
padding-bottom:6pt;
}



Price,Description,Quantity
{
font-family=Arial;
font-size=20pt;
color:teal;
display:block;
padding-top:2pt;
padding-bottom:2pt;
}

0 comments:

Post a Comment