The following three XML documents contain exactly the same information.
A Date attribute is used in the first example:
<note date="12/11/2002">
<to>Rasik</to>
<from>Bapotra</from>
<heading>Reminder</heading>
<body>Dont't forget me this weekend! </body>
</note>
Dont't forget me this weekend!
A date element is used in the second example:
<note>
<date>12/11/2002</date>
<to>Rasik</to>
<from>Bapotra</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend! </body>
</note>
Don't forget me this weekend!
An expanded date element is used in the third: (ThIS IS MY FAVOURITE):
<note>
<date>
<day>12</day>
<month>11</month>
<year>2002</year>
</date>
<to>Rasik</to>
<from>Bapotra</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend! </body>
</note>
Don't forget me this weekend!
April 18, 2009
0 Store data in child elements in XML
Posted by raj on 4:15 AM
0 comments:
Post a Comment