|
-
Oct 11th, 2005, 06:08 PM
#1
Thread Starter
No place like 127.0.0.1
[RESOLVED] Anything Available to make XML easier to use in VB6?
I am finding msxml.dll rather difficult to use and I was wondering if anyone knew wehre I could find a class that makes things easier to work with. Ideally it would allow me access nodes like this:
VB Code:
oDoc.Node("Project").Node("Form").CreateNode "Name"
oDoc.Node("Project").Node("Form").Node("Name") = "frmMain"
and maybe return errors if the node doesn't already exist. Anything even close to this would be great. The Microsoft one is just ridiculous. I have to do a ton of work just to get it to save with line breaks and tabs in the proper places. There has to be a better way... ANY ideas would be appriciated.
-
Oct 11th, 2005, 06:25 PM
#2
Re: Anything Available to make XML easier to use in VB6?
Why do you need to use XML at all? It's a text file anyway so why not ordinary INI or some small database instead?
-
Oct 11th, 2005, 06:57 PM
#3
Re: Anything Available to make XML easier to use in VB6?
-
Oct 11th, 2005, 07:01 PM
#4
Thread Starter
No place like 127.0.0.1
Re: Anything Available to make XML easier to use in VB6?
 Originally Posted by RhinoBull
Why do you need to use XML at all? It's a text file anyway so why not ordinary INI or some small database instead?
XML is the format of the future. It makes things easier to use (supposedly!).
I am using it to make a file format similar to a visual basic project file except in XML. I need to store the path to a list of files and some information about the project itself and the positions of the windows the last time the app was opened.
-
Oct 11th, 2005, 07:04 PM
#5
Re: Anything Available to make XML easier to use in VB6?
Download MSXML4 from the link that dglienna supplied. There are a lot of examples in our forums that use it and if you have questions just ask.
-
Oct 11th, 2005, 07:11 PM
#6
Re: Anything Available to make XML easier to use in VB6?
 Originally Posted by eyeRmonkey
XML is the format of the future.  It makes things easier to use (supposedly!). ...
Where did you get that idea from? MS promissed that when XML was first introduced (especially in regards to EDI) and guess what - many consider this "technology" as failure, though. But MS's still promoting it...
-
Oct 11th, 2005, 07:28 PM
#7
Thread Starter
No place like 127.0.0.1
Re: Anything Available to make XML easier to use in VB6?
Maybe I will go with INI then. That was my first thought. Plus there are plenty of classes available for editing them in an OOP way already. I think doing it with INI would save me a lot of time.
-
Oct 11th, 2005, 07:34 PM
#8
Re: Anything Available to make XML easier to use in VB6?
Well, don't get wrong - I don't want to force you to change your design - I may only recommend something. I would (and usually that's how I do things) try different approaches to see which one fits better.
-
Oct 11th, 2005, 07:55 PM
#9
Re: Anything Available to make XML easier to use in VB6?
I think the for LF, as it is new, you shouldn't use an INI, which is old.
-
Oct 11th, 2005, 08:01 PM
#10
Re: Anything Available to make XML easier to use in VB6?
But XML is crap too so which one is better? The way I see it - the one that's simpler, though.
-
Oct 11th, 2005, 08:09 PM
#11
Re: Anything Available to make XML easier to use in VB6?
True, I don't think text is going anywhere soon.
-
Oct 11th, 2005, 08:13 PM
#12
Thread Starter
No place like 127.0.0.1
Re: Anything Available to make XML easier to use in VB6?
You guys are saying exactly what I was thinking. LF is new and I think XML would fit it better, but it seems VERY hard to use. INI is old and wouldn't fit as well, but is a lot easier to use. Maybe I will get it better after I read some examples from the MS XML SDK (enough abbreviations for you?).
I really wish I could just access the nodes like I posted above. Life would be great. If I wasn't working on LF right now I would make a class that works like the code I posted above. That would be very helpful I think.
-
Oct 11th, 2005, 08:35 PM
#13
Thread Starter
No place like 127.0.0.1
Re: Anything Available to make XML easier to use in VB6?
I think vbAccelerator is going to come to my rescue for about the millionth time on LF:
http://www.vbaccelerator.com/home/VB...ag/article.asp
I actually had this a couple days ago (while trying to figure out how to make project files) but I ignored it because it said property bag. I decided to open it up today and there is no reason not to use it. The only (minor) downside is that the topmost tag is <PropertyBag> instead of Project or Project properties, but that is just me being picky. I think this will work well. Its just what I was looking for basically.
Thanks guys. I think I will mark this resolved and if I have more problems (or if anyone has another suggestion) I will post here or start a new thread.
-
Oct 11th, 2005, 09:42 PM
#14
Re: Anything Available to make XML easier to use in VB6?
 Originally Posted by RhinoBull
But XML is crap too so which one is better? The way I see it - the one that's simpler, though.
I definitely don't agree with you about XML but it is certainly harder to use than an ini file. However XML is much more powerful than an ini file so which is better depends on the situation.
-
Oct 11th, 2005, 10:59 PM
#15
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
Personally, I think XML is much more readable and not any harder to use at all. INI's are flat and when large, rather hard to read. Most importantly, XML allows for nested structure, whereas INI files don't. To describe an OO layout, you can only use XML.
-
Oct 12th, 2005, 12:23 AM
#16
Thread Starter
No place like 127.0.0.1
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
Hopefully the vbAcc class will give me the structure I need with minimal work. Its the best of both worlds. 
All I need to do after that is write some code to auto-tab everything to the right ammount.
Thanks everyone (suggestions are still welcome if you are readin this and have an idea).
-
Oct 12th, 2005, 07:56 AM
#17
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
 Originally Posted by penagate
Personally, I think XML is much more readable and not any harder to use at all. INI's are flat and when large, rather hard to read. Most importantly, XML allows for nested structure, whereas INI files don't. To describe an OO layout, you can only use XML.
No, XML is a flat ascii file as well - it's just that there is a library that reads/writes in a fancy way, that's all. You may create you INI file to look just like XML with all values indented withing the parent and so on and so forth but the point is both files are flat and contain pure ascii text.
-
Oct 12th, 2005, 08:11 AM
#18
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
Of course they are both flat text files but my point is XML conveys a nested structure whereas INI files can't. All you have are sections and attributes within those sections. There is nothing similiar to actual nodes.
-
Oct 12th, 2005, 10:19 AM
#19
Lively Member
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
Wow. I can't believe that I've actually read some of these posts!
First off, MS isn't the one primarily behind XML. XML is an open standard and is used as a basis for a lot of the newer technology you'll see today.
For example, look at RSS/Atom. Pure XML. Look at SOAP. Again, based on XML. Look at web services. XML. Most inter-platform technology you'll see today has some flavor of XML driving it.
XML is NOT a flat file - rather it is a rich, structured data container. XML can (unlike other methods of storing data) both STORE and DESCRIBE the data within. XML can be easily read on ANY platform between programs.
To dismiss XML as "crap" will definately put you behind the 8 ball - so to speak. To dismiss it as some MS technology that is going nowhere is to do yourself a major disservice.
As for a way to easily read/write XML files, I suggest ujXML. It is both free and easy to use.
-
Oct 12th, 2005, 04:03 PM
#20
Thread Starter
No place like 127.0.0.1
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
Thanks Brad! I will take a lok at ujXML when I get home.
-
Oct 12th, 2005, 04:23 PM
#21
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
 Originally Posted by BradBrening
... To dismiss it as some MS technology that is going nowhere is to do yourself a major disservice...
In term of what, may I ask you Mr. XML ???
-
Oct 12th, 2005, 08:38 PM
#22
Lively Member
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
Well, in terms of being on top of where things are going. Look at the new Office coming out. Everything will be XML based. Look at the new versions of SQL Server. There is a lot of emphasis on the ability to interact with XML. Many portions of the new Vista OS will be XML based.
I guess if you never hope to interact with the new way the world of data is looking, then you don't need to worry about XML. If you are always going to be programming systems where you are always going to be the provider and the consumer of the data you generate, then XML may not be such a big deal. Otherwise, I'd at least become familiar with how it works, and somewhat familiar with methods on working with XML data.
BTW, Rhino, I am not sure if you were being sarcastic or what. I am not "Mr. XML". I typically use SQL Server for my data storage needs. I do know, however, that it is always the height of stupidity to dismiss something so pervasive as XML as a "passing fad" or "crap". A quick look around will prove otherwise.
If you don't have some sort of grasp on the concept, you will be robbing yourself of a whole world of information.
-
Oct 12th, 2005, 08:56 PM
#23
Lively Member
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
I thought I'd throw an example in here, too. Since the new Office formats are XML based, if you know how XML works you can create a valid Word/Excel/etc. document from scratch (as long as the schema is valid) - without the need to have Word/Excel/etc. installed on the machine that creates the document.
Go to http://www.moreover.com. You can add tons of news feeds into your application (either standalone or server based) with just a little XML.
Look at RSS. It is quickly becoming a viable medium for advertising or simply keeping in touch with your clients customers. Simple XML. RSS is becoming so big that RSS support will be prominently included in IE7.
Go to http://www.xmethods.net. All these web services are simply remote functions that you can call to add functionality to your apps. All XML/SOAP based. .NET natively makes using these functions easy, however with a little XML knowlege you can use them in VB6 as well.
There really are thousands of examples.
-
Oct 13th, 2005, 12:23 AM
#24
Thread Starter
No place like 127.0.0.1
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
Thanks for your expertise Brad! You made some excellent points. I think I will still I will still use the vbAccelerator properties bag (link above) just because it is the easiest to use.
Thanks again.
-
Oct 13th, 2005, 08:22 AM
#25
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
 Originally Posted by BradBrening
...If you don't have some sort of grasp on the concept, you will be robbing yourself of a whole world of information.
You weren't even born yet when I got my "grasp on the concept" so get over yourself but keep it quiet.
New Office, Vista, ... ? That's why most experts consider W2K one of the best OSs ever. FYI, most industries don't want to use XML for data transmissions at all - they deny it and some of this tasks are regulated by the government. So, go ahead use your xml and be happy but don't you ever call me (or anybody else) stupid.
Regards.
-
Oct 13th, 2005, 10:03 AM
#26
Lively Member
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
I never called you stupid or anyone else, for that matter.
FYI - Governmental sites relating to XML:
http://www.xml.gov/ - the URL says it all.
http://www.usgs.gov/ - quite a few XML data feeds.
http://www.fbi.gov/pressrel/pressrel05/response.htm - great article about the FBI using XML in their FBI Intelligence Information Reports Dissemination System.
http://www.odci.gov/employment/jobs/...e_app_dev.html - one of many CIA job offers requiring XML/SOAP skills.
Two minute search, turned up thousands of similar results.
Yeah, a real governmental backlash towards that new-fangled XML thingy.
Also, W2K the best OS ever?!?! Wow, man. Just wow. I am at a total loss for words.
I've already PMed you, so if you want to continue misrepresenting my posts you can do so via that channel, instead of cluttering up the boards.
-
Oct 13th, 2005, 10:06 AM
#27
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
 Originally Posted by BradBrening
..., instead of cluttering up the boards.
Exactly right so let's stop it - I have absolutely no pleasure of communicating to you.
-
Oct 13th, 2005, 10:07 AM
#28
Re: [RESOLVED] Anything Available to make XML easier to use in VB6?
You did use the phrase "The height of stupidity".
I'm closing this thread since I think everything that is useful has already been said.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|