C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Training   ASP.NET Web Hosting    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

Play Silverlight Games or Submit your Silverlight applications and earn 90% AdSense revenue.

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Resources » Articles » General »

XML Parser's


Posted Date: 20 Jan 2005    Resource Type: Articles    Category: General
Author: Vipin SMember Level: Gold    
Rating: Points: 5



There are two types of XML Parsing

1.Document Object Model (DOM)
DOM Loads whole document into memory.So it requires lot of memory.
Not recommended for large XML Document.Using DOM you can traverse thru an XML document.
To parse XML in .NET enviornment using Document object model,use XmlDocument and XmlElement. These classes are available in System.Xml namespace

Using this classes,we can traverse an XML document and add,modify its element.

Creating XmlDocument
XmlDocument newXmlDoc = new XmlDocument();
Load Xml Document
newXmlDoc.Load(XmlFileName);
To Create Element
XmlElement newXmlElement = newXmlDoc.CreateElement("NEWELEMENT");
XmlElement newXmlMain = newXmlDoc.CreateElement("MAIN");
To Add Child
newXmlMain.AppendChild (newXmlElement);
Save Document
newXmlDoc.Save();



2.Simple API for XML (SAX)

Load/Read portion of XML document as needed.This is the best option when memory is limited.Cannot traverse backward thru an XML file.Speed is very less compare to DOM





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Accounts
Previous Resource: List of software companies in Tamilnadu
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use