C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Revenue Sharing | Talk to Us |



My Profile

Gifts

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




Read TATA Nano reviews.
dotNet Slackers   BizTalk Adaptors    Web Design   Scripts
Are you waiting for engineering entrance result? Watch here for engineering entrance results.
silicone halloween masks

Contact Us    Privacy Policy    Terms Of Use