C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...







Our first XML file



This article explains a simple XML file creation.



let's construct simple XML program. Here is the code follows. XML file mainly built with nodes.



<Emps>

<Emp>

<EName> John </EName>

<ESal> 15000 </ESal>

<EDesignation> Software engineer </EDesignation>

</Emp>


<Emp>

<EName> Smith </EName>

<ESal> 10000 </ESal>

<EDesignation> Accountant </EDesignation>

</Emp>


<Emp>

<EName> Tony </EName>

<ESal> 100000 </ESal>

<EDesignation> Manager </EDesignation>

</Emp>

</Emps>



This is an XML file to store the employee information .

Here <Emps> is a node and <EName> , <ESal> , <EDesignation> are Child elements. Write this code in the note pad and save it as First.xml extension and execute in the internet explorer


Observe the difference between this example and previous one



<Emps>

<Emp>

<EName> John </Ename>

<ESal> 15000 </Esal>

<EDesignation> Software engineer </EDesignation>

</Emp>

<Emp>

<EName> Smith </EName>

<ESal> 10000 </ESal>

<EDesignation> Accountant </EDesignation>

</Emp>

<emps>



Observe here if our node is started with <Emps> but ended with <emps> and some of the attributes also like <EName> </Ename> all these are errors because XML case sensitive


Note: here < emp > is different from < Emp > since we all known that it's a case sensitive


  • Next Chapter: XML Elements ans Attributes.

  • Previous Chapter: Math Object - Example

  • Tutorial Index



  • dotNet Slackers

    About Us    Contact Us    Privacy Policy    Terms Of Use