idea Bubbling
 
Home Projects Articles Books Links Humor Feedback
Xml Handler Last Update: 07 Feb 2008
Xml Handler is a library to allow developers to store data as XML-file without the knowledge of XML concepts. Precisely saying, it can act as a middle layer to support Add, Select with condition, Insert, Update, and Delete operations with Commit and Rollback. Additionally we can set field to DataType, AutoIncrement and KeyField. Actually the operations are handled by the DataSet, finally stored it as XML file. So, you can expect most of the operations suppoerted by the DataSet here. It is developed by C#.NET 2.0 and provided as open source and free software with GNU Lesser General Public License . You are encouraged and invited to contribute. XML Handleris designed to support : squared structure i.e.data table, no attributes, minimal data, read more & write less, portable, simple & easy use. It suffers all the disadvantages of XML as a text-file.
 Try our online sand box
92
Xml Handler Google Group
XML Handler is an open source project and so naturally relies support from a community of users with a shared interest in the project.  Having trouble using some aspect of it? or Want to know the list of bugs? or Like to receive an email when updates are made or Want to simply provide feedback or ideas for further development? Then XMLHandler Google Group is the place to go.
ASP.NET Quick Qtart
[1] Reference the XmlHandler.dll to your asp.net project
[2] Add "ideaBubbling.Xml" namespace
[3] "XmlHandler" is a main class, the constructor create the xml file optionaly with the specifid structure.
strFileName = Server.MapPath("SandBox1.xml");
xml = new XmlHandler(strFileName, true,"Students","Student","Name","Age");

sandbox1.xml: A filename used to store our data.
pFileAutoGenerated - true: A boolean parameter used to create the file, if it is not available.
Students: is a root element; Every XML has only one root element (like a table, that holds all records)
Student: is a sub root element, that holds each row.
Namet:
is a actual field, value provided to store. Age: is a another field, value provided to store.
The actual xml structure for the constructor is:
<Students> <Student><Name/> <Age/><Sex/></Student></Students>
xml.Add("Vasanth", "27");
xml.Commit();

The Add() method used to append records to the dataset, the Commit() will write the dataset to the xml file. For more info: please have a look at the test applicaiton.
 
ideaBubbling.com 2007-2008 india @ Resume