Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Writing and Reading from and XML Fragment File

I am creating a kind of customer database. This program keeps a SQL database of customers, along with a discounts table. I needed to have orders for each customer, so I decided to go to XML. I have an XML file called orders.xml in a subdirectory of data(data\orders.xml). Orders can be added at later times, so I need the program to be able to find the <customer> node, and read it's attribute "name". If the element's name attribute equals the currentCustomer variable(string), then I want it to add the order as an empty child element to that customer. Else, create the new customer element w/name attr. and add the order. My problem is, determining if that customer exists, and reading the customer's current orders. The current orders are displayed in a listbox called lstCurrent, and would like to have it load in the Form_Load event. I realize this is more than likely alot of work, or a simple code that I don't know. Any help on this would be greatly appreciated. Thankyou in advance for those that attempt such a feat.
[1053 byte] By [jammer2552] at [2007-11-11 9:57:18]
# 1 Re: Writing and Reading from and XML Fragment File
Here are a bunch of links to sample projects that work with XML data.
http://www.freevbcode.com/ShowCode.Asp?ID=312
http://www.freevbcode.com/ShowCode.Asp?ID=5095
http://www.freevbcode.com/ShowCode.Asp?ID=652
http://www.freevbcode.com/ShowCode.Asp?ID=1455
http://www.freevbcode.com/ShowCode.Asp?ID=2745
Ron Weller at 2007-11-11 17:23:27 >