Reading XML file - Printable Version +- BP Forums (https://bpforums.info) +-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55) +--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56) +---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8) +---- Thread: Reading XML file (/showthread.php?tid=521) |
Reading XML file - Covert2String - 04-22-2012 Hi, this time I need to read values from a XML file, the problem is, it pops up an error saying it contains invalid characters. These are a few lines of my XML file: Quote:<item_proto extended="true" version="1"> So, how can I fully read the XML file, line by line, and fill a Box (comboBox, listbox...) with the values. Re: Reading XML file - brandonio21 - 04-23-2012 Covert2String Wrote:the problem is, it pops up an error saying it contains invalid characters. When does this error popup? This could definitely be a problem! Also: This XML File does not seem to be written using standard XML syntax, which could make things difficult. Here is an example of standard XML Syntax: Code: <?xml version="1.0" encoding="utf-8" standalone="yes"?> Re: Reading XML file - Covert2String - 04-29-2012 So, it's not a valid XML file, however I still need to read it, like a custom XML parser, any thoughts on how to make the code not too slow? Re: Reading XML file - brandonio21 - 04-30-2012 So here is my method of parsing the text file. The form contains two listboxes (1 and 2), 1 contains the categories while 2 contains the actual values. Here is the code I used: Code: Public Class Form1 You may find it easier to view the code on PasteBin: <!-- m --><a class="postlink" href="http://pastebin.com/M7R1FZaK">http://pastebin.com/M7R1FZaK</a><!-- m --> Hopefully this helps! Re: Reading XML file - Covert2String - 04-30-2012 I don't know how, but you just keep saving me! Thank you! Re: Reading XML file - brandonio21 - 04-30-2012 Of course! |