Accessing a XML file

Cassio

Well-known member
Joined
Nov 30, 2002
Messages
276
Location
Rio de Janeiro
Hi! Ive never used XML before and im trying to put some user info in a XML file. This is the XML file:

Code:
<?xml version="1.0" ?>
<Banco>
	<Server>Quarto</Server>
	<Database>Pizza da pra
 
You can use the xpath query. (a lot of help is available on it)

example to get the value of your Server element above:
Code:
Dim doc As New XmlDocument()
doc.Load("..\Config.xml")
 Dim serverNode As XmlElement = doc.SelectSingleNode("Banco/Server")
Dim serverValue as string = serverNode.InnerText will hold Quarto
 
Back
Top