More .NET fun
Aug. 13th, 2003 05:33 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I've had a stressfull 24 hours. I hate it when things don't work. I hate it even more when things don't work and don't give you enough information to even start looking for your problem...
Erin had asked me to find her a baclup program and, following 3 hours of searching, I decided that there wasn't a simple program that would do the copying on a daily basis. so I'd write my own. How hard could it be?
I got a simple program up and running yesterday which copied a folder from one place to another. That was actually fairly easy. I then decided I needed to store a list of which folders needed to be backed up. Now, I could play around with databases, but frankly that would mean digging out Access and finding out how to do Data Access in .NET, more trouble than I could be bothered with at that moment. Instead, I figured I'd just store the data in XML. XML's dead easy, after all. Any idiot can do it.
So I broke out the .NET book I have, discovered I was going to have to get myself involved in schemas (which define what a valid XML file can look like) and threw myself into it. And bounced off. With a fucking usless error message.
24 hours later, and much swearing and stress later, I discover that the problem is that alhough my XSD had a perfectly reasonable heirarchical structure, and validated just fine, it didn't contain an actual 'element'. I assumed that the top of the heirarchy would get automatically recognised as the root, but no. Apparently I needed an actual element to sit at the top. Not that the error message told me anything that useful. Noooooo.
I haven't got anywhere near the actual programming bit, either. I'm still futzing around in the IDE. I hesitate to think what the actual programming will be like...
Erin had asked me to find her a baclup program and, following 3 hours of searching, I decided that there wasn't a simple program that would do the copying on a daily basis. so I'd write my own. How hard could it be?
I got a simple program up and running yesterday which copied a folder from one place to another. That was actually fairly easy. I then decided I needed to store a list of which folders needed to be backed up. Now, I could play around with databases, but frankly that would mean digging out Access and finding out how to do Data Access in .NET, more trouble than I could be bothered with at that moment. Instead, I figured I'd just store the data in XML. XML's dead easy, after all. Any idiot can do it.
So I broke out the .NET book I have, discovered I was going to have to get myself involved in schemas (which define what a valid XML file can look like) and threw myself into it. And bounced off. With a fucking usless error message.
24 hours later, and much swearing and stress later, I discover that the problem is that alhough my XSD had a perfectly reasonable heirarchical structure, and validated just fine, it didn't contain an actual 'element'. I assumed that the top of the heirarchy would get automatically recognised as the root, but no. Apparently I needed an actual element to sit at the top. Not that the error message told me anything that useful. Noooooo.
I haven't got anywhere near the actual programming bit, either. I'm still futzing around in the IDE. I hesitate to think what the actual programming will be like...
no subject
Date: 2003-08-13 02:00 pm (UTC)no subject
Date: 2003-08-13 06:31 pm (UTC)so much so, that in the bookmark manager program i'm writing (similar to your situation, i searched on the net and didn't find any existing ones that met my requirement, so decided to do it myself - how hard could it be, right? heh), i naturally decided to create my ini file in xml format. even though my version of c++ at home doesn't have built-in xml support. i was wondering if i could just copy some files to my machine for that, or if installing msxml would give me access to those classes and functions... not that i really need it, since parsing a simple xml file like mine isn't hard.
no subject
Date: 2003-08-14 01:34 am (UTC)Cheers tho.
no subject
Date: 2003-08-14 01:19 am (UTC)I have done some XSD stuff lately, but just a training course. Surely there you have access to documentation/books/help/examples on what constitutes a valid XSD?
I think you were rushing ;-)
no subject
Date: 2003-08-14 01:36 am (UTC)On my computer at home?
Not really. There's not a great number of "introduction to XSD" site on the net. I didn't find any good ones. Much less ones that told me how VS.NET used it. And my XSD was happily validating as correct both at the Microsoft and W3C sites - neither of which apparently check that you have a root element.