Lets start off by saying I HATE the documentation for XML. All other documentation is easy for me...maybe I really need to spend some time learning more about this XML stuff...
Now with that out of my system, I can ask the question. I have an xml document, I need to get the values individually into different string variables.
Here is the XML Document:
So all I want is to open it, access each node independently and put its value in variables. Here are the variables I want to end up with:Code:<?xml version="1.0" encoding="utf-8" ?> <configuration> <server> <connectionstring>myConnection</connectionstring> <smtpserver>myServer</smtpserver> </server> <administrator> <username>hellswraith</username> <password>mypassword</password> <firstname>Brian</firstname> <lastname>Russell</lastname> <email>[email protected]</email> <birthdate>4/11/1976</birthdate> </administrator> </configuration>
I have no idea how to do this. I have tried like 10 different ways from what I have found on the Internet, but none just access the node, and give back a value based on the nodes name I give it. This seems like it should be super easy!Code:string connectionString = ?; string smtpServer = ?; string adminUserName = ?; string adminPassword = ?; string firstName = ?; string lastName = ?; string emailAddress = ?; DateTime birthDate = ?;




Reply With Quote