parse xml to variables
parse xml to variables
parse xml to variables
parse xml to variables
parse xml to variables
parse xml to variables parse xml to variables parse xml to variables parse xml to variables parse xml to variables parse xml to variables parse xml to variables parse xml to variables
parse xml to variables parse xml to variables
parse xml to variables
Go Back  Xtreme Visual Basic Talk > > > parse xml to variables


Reply
 
Thread Tools Display Modes
  #1  
Old 08-14-2010, 08:39 PM
false74 false74 is offline
Freshman
 
Join Date: Jul 2010
Location: usa
Posts: 29
Default parse xml to variables


Hello all, I have done some searching and I think XML is the filetype i need for this... I want a user to be able to load an XML file that contains the values for variables.

So for instance I have an xml file with this in it:
Code:
<?xml version="1.0" encoding="UTF-8"?>
	<options>
		<myname>Bob</myname>
		<color>color.blue</color>
	</options>
then in my code i would have this:
Code:
public color as color
public name as string

Public Sub readxml(ByRef file As String)
        xdoc.Load(file)
'cannot convert nodelist ??
        name = xdoc.GetElementsByTagName("myname")
        color = xdoc.GetElementsByTagName("color")
    End Sub
in the xml, there wont be multiple entries for anything; so how do i get the entry and put them into a string or anything i would need to use them as?
Reply With Quote
Reply


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

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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
parse xml to variables
parse xml to variables
parse xml to variables parse xml to variables
parse xml to variables
parse xml to variables
parse xml to variables parse xml to variables parse xml to variables parse xml to variables parse xml to variables parse xml to variables parse xml to variables
parse xml to variables
parse xml to variables
 
parse xml to variables
parse xml to variables
 
-->