Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clear xml file with vb.net

Status
Not open for further replies.

buddyel

MIS
Joined
Mar 3, 2002
Messages
279
Location
US
the following is a small xml file that saves transactions entered by the user. At the end of the month a report is printed. I need to have the xml file cleared of all data at the end of the month as well and I am unsure of how to go about that. does anyone? thanks!!!

<?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?>
<NewDataSet xmlns=&quot; <record>
<partnumber>13M133403</partnumber>
<from>eri</from>
<to>ten</to>
<quantity>307.25</quantity>
<entered>11/15/02</entered>
</record>
<record>
<partnumber>64Z100329</partnumber>
<from>chi</from>
<to>mia</to>
<quantity>1500</quantity>
<entered>11/15/02</entered>
</record>
</NewDataSet>
 
Are you creating the file, and if so how.
 

I added a blank xml file to my vb project and entered the tags and then created a schema from that.
 

I figured it out.. I created a button to clear the xml file. I loaded the xml file into a dataset and then cleared the dataset and then wrote back that change. I also added a line to the save routine to read the schema as well as the xml file. This seems to have done it, whether it is the best way or not who knows, but it works well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top