Welcome, Register for free! or Login below:
EduGeek.net RSS Feeds Register FAQ Members Social Groups User Map Calendar Search Today's Posts Mark Forums Read

Go Back   EduGeek.net Forums > Coding and Web Development > Coding
Reply
 
LinkBack Thread Tools Search Thread
Sponsored Links
Old 09-06-2009, 07:47 AM   #1
 
SimpleSi's Avatar
 
Join Date: Jun 2005
Location: Lancashire
Posts: 2,456
uk
Thanks: 281
Thanked 173 Times in 143 Posts
Rep Power: 48 SimpleSi has much to be proud of SimpleSi has much to be proud of SimpleSi has much to be proud of SimpleSi has much to be proud of SimpleSi has much to be proud of SimpleSi has much to be proud of SimpleSi has much to be proud of SimpleSi has much to be proud of
Default Help parsing XML files using VB

or any other language producing standalone exe

I want to make a prog to parse a bunch of xml files looking for a field and then change the value of that field.

Im completely stuck at the beginning just trying to use VB 2008 express to just read one simple XML file

Every single example I can find gives me an exception so I must be missing something "basic"

Help (from VB experts or anyone else using a free prog)

regards

Simon

Last edited by SimpleSi; 09-06-2009 at 07:54 AM..
  Reply With Quote
Old 09-06-2009, 08:10 AM   #2
 
monkeyx's Avatar
 
Join Date: Nov 2006
Posts: 329
uk
Thanks: 6
Thanked 42 Times in 34 Posts
Rep Power: 16 monkeyx is a jewel in the rough monkeyx is a jewel in the rough monkeyx is a jewel in the rough
Default

Hi,

I have used the following quite a bit

CodeProject: Quick and Dirty Settings Persistence with XML. Free source code and programming help

This is a more complete parsing article.

CodeProject: XMLite: simple XML parser.. Free source code and programming help

Not done much with vb.net, but you could use sharpcode to convert the c# to vb.net

Regards,

Tim
  Reply With Quote
Old 09-06-2009, 08:22 AM   #3
 
ICTNUT's Avatar
 
Join Date: Jul 2005
Location: Hereford
Posts: 1,052
uk uk wales
Thanks: 103
Thanked 167 Times in 58 Posts
Rep Power: 39 ICTNUT is a splendid one to behold ICTNUT is a splendid one to behold ICTNUT is a splendid one to behold ICTNUT is a splendid one to behold ICTNUT is a splendid one to behold ICTNUT is a splendid one to behold ICTNUT is a splendid one to behold
Default

Not sure if you want VB or VB.Net so heres both:

VB.Net:
vbCity/DevCity.NET Forums :: FAQ :: .NET :: VB.NET :: XML

VB:
vbCity/DevCity.NET Forums :: FAQ :: Visual Basic 6 :: VB6 & Web Development :: XML
  Reply With Quote
Old 09-06-2009, 08:22 AM   #4
 
Jamo's Avatar
 
Join Date: Jan 2009
Posts: 492
uk
Thanks: 5
Thanked 64 Times in 53 Posts
Rep Power: 16 Jamo is just really nice Jamo is just really nice Jamo is just really nice Jamo is just really nice Jamo is just really nice
Default

XML Developer Center

Check the MSDN refs, there is a .NET class for interpreting XML.
  Reply With Quote
Old 09-06-2009, 09:22 PM   #5
 
SimpleSi's Avatar
 
Join Date: Jun 2005
Location: Lancashire
Posts: 2,456
uk
Thanks: 281
Thanked 173 Times in 143 Posts
Rep Power: 48 SimpleSi has much to be proud of SimpleSi has much to be proud of SimpleSi has much to be proud of SimpleSi has much to be proud of SimpleSi has much to be proud of SimpleSi has much to be proud of SimpleSi has much to be proud of SimpleSi has much to be proud of
Default

Thanks for all the suggestions - I've found my problem!

I was using wordpad to save example xml files (I use it all the time to edit my real xml files) to read back in.

Of course, it defaults to saving as type rtf so the xml files were completely mal-formed

Found this out by just reading them back in one byte at a time

regards

Simon
  Reply With Quote
Old 10-06-2009, 08:25 AM   #6
 
Jamo's Avatar
 
Join Date: Jan 2009
Posts: 492
uk
Thanks: 5
Thanked 64 Times in 53 Posts
Rep Power: 16 Jamo is just really nice Jamo is just really nice Jamo is just really nice Jamo is just really nice Jamo is just really nice
Default

ah that would do it!! Try looking at Notepad++ for an alternative to that, it will format the files properly and make the code much easier to read!!
  Reply With Quote
Reply

EduGeek.net Forums > Coding and Web Development > Coding

Similar Threads
Thread Thread Starter Forum Replies Last Post
XML - Formatting confusion steele_uk How do you do....it? 5 26-01-2009 10:11 PM
Flash Slideshow (.xml) danIT General Chat 7 07-05-2008 12:40 PM
Search replace across multiple XML files ajbritton Windows 6 06-04-2008 11:07 PM
WDSClietUnattended.xml ICTNUT How do you do....it? 4 17-01-2008 10:17 AM
Any XML gurus? TechMonkey Web Development 4 02-02-2007 01:40 PM



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search Thread
Search Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:25 PM.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright EduGeek.net




website uptime

© 2005 - 2009 EduGeek.net
SERVER: 4
no new posts