1 Attachment(s)
From one Newbie to another...
Me offering XML/VB advice? That's a scary thought. Caveat Emptor
Hi Adam,
Attached is a simple VB/XML app I've been fiddling with. It's not for real, I've just been buggering around in fact.
It uses a 'Purchases' transaction file with a simple XML structure which looks thusly:
Code:
[Purchases]
[Purchase]
[AccNo]... [/AccNo]
[SerialNo]... [/SerialNo]
[Value]... [/Value]
[Date]... [/Date]
[/Purchase]
.......... lots more transactions
[/Purchases]
But what it does is this:
1) The Load button reads an XML file in and sticks the Account Numbers in a ListBox. It checks the XML is Kosher with ParseError and that the file has a 'Purchases' top tag. It checks that each AccNo only gets added to the list box once.
2) The Show button dumps the XML into debug
3) The Show Purchases button checks the ListBox for a selected AccNo, then puts all transactions for that AccNo into another ListBox.
4) The Add Transaction button adds a transaction using the AccNo and Amount from 2 TextBoxes, and also adds the system date and increments the transaction serial number.
I've put some comments in, and if you step thru' the code it should make sense. I'm not sure I've done it the easiest way... but for what it's worth, here it is! Your mileage may vary.