Attributes with name value pair

To give more detail about the element we can use attributes. We give more details about the element by using attributes. All attributes will have name and value. Where value are kept within quotes. Here is an example. For each member we can have two address , one is residential and other is official.

<address type='residential'>
<door_no>234-ac</door_no>
<street>Great Wall</street>
<city>Alabama</city>
</address>
<address type='official'>
<door_no>456-cd</door_no>
<street>North Street</street>
<city>New York</city>
</address>

In the above code attribute gives us idea on type of data the element is having.
Check this sample xml file with attributes.

What is XML?


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com




    Post your comments , suggestion , error , requirements etc here .




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer