Wow 50,000 lines of a xml config file!
Have you considered to put all that stuff in an Access file or at least in an Excel file.
Main Topics
Browse All TopicsI am new to VB and I'm working on my first project.
We have developed an in house monitoring tool that requires xml documents for configuration. These documents are similar to below:
<?xml version="1.0"?>
<systems>
<system name="CoreSwitch">
<attribs>
<attrib="ifLinkUpDownTrapE
<desc>Link Up/Down - FA0/</desc>
<snmpcom>fspublic</snmpcom
<oid>1.3.6.1.2.1.31.1.1.1.
</attrib>
</attribs>
</system>
</systems>
As you can see this if for an SNMP value to be pulled from a switch. What I really need assistance with is modifing these files. Sometimes they are upwards of 50,000 lines and only one value in each section needs to be changed or we bring in a new system and the information is slightly differnet.
I would like to create a VB form that would have the following fields in it:
File Name
Path
System Name
Attribute
Description
Community
OID
Ideally I would run a small VB exe, fill in the necessary information then click create and it would generate a new xml document with the proper information. I have been doing this with a vbs, however that is becoming cumbersome with of the input boxes popping up. So I decided I would take a shot a writing a little app to do this for me. In additon this would greatly help to reduce my time in other areas once i get the hang of writing small apps that perform specific functions.
If you need additional information or have questions, I am willing to help with whatever is necessary.
Matt
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
wsh,
That was an entertaining comment. I will check out the videos. I have a little experience with vbs and currently use the objNewFile.WriteLine command to accomplish this. I have downloaded VB Express and gotten as far as being able to create the form I want use and get the application to actually read from the textboxes. Unfortunately I have not found anything in VB as easy to use as WriteLine.
0xCODEB07,
Yeah 50,000 + lines in some of them. I only included a small amount of the actual schema that we use. There are numerous other attributes that are included but I figured you guys would get the idea just from a few lines. I suppose we could store the config in a database but that would make it more difficult to manage, not to mention the size differnence. The xml files are only used as templates for the different systems. Once they are loaded into the monitoring system they are really not needed unless a change is made. As for Excel, I'm not sure that would be a viable option as xls files version 2003 and previous have a limitation of 65,535 rows and some of the current XML files are over 100,000, (most are in the 10,000 - 15,000 range).
One option I am working on now involves the System.IO namespace with the CreateFile and StreamWriter classes.
Please let me know if I'm on the right track. I really only need something to write a simple txt file with the formatting I include. I have thought about using the XML namespaces however I'm not sure I want to put that much time in at the moment.
Business Accounts
Answer for Membership
by: wsh2Posted on 2007-07-14 at 15:29:21ID: 19488341
Respectfully FSEngineer, what you are asking for here is an entire programming application replete with with a full education and all this for the incredibly eye popping amount of 500 (absolutely no cost) points! Nice request.. <smile>.
vstudio/ex press/begi nner/windo ws/ tier1/
So lets get started..
I assume you have already downloaded an dinstalled VB.Net Express. The next step is for you to go
here and take in the .VB.Net educational videos.
http://msdn.microsoft.com/
There are a variety of techniques you will need to understand to fulfill your requirement and these 3 tiers of educational videos should get you there as fast as anything else available. Oh, and as to the cost of these videos?.. It is a mere trifle compared to the cost of the 500 points you spent on this question.. Call the Brinks truck.. it's free.. <wink>.
Note: After you get through the videos.. Google the XMLReader / XMLwriter.. for examples on how to interact with your file.