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.
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!
I just wanted to come back and tell you that the code you gave works perfectly.
I like the dataset way...it seems real simple.
Anyway, it seems like there would be an xml object that you could just call a method passing in the name of the element you wanted, and it would return the result. Seems like it should be that simple..lol. I just don't know much about XML yet to fully understand why it is so complex.
Anyway, it seems like there would be an xml object that you could just call a method passing in the name of the element you wanted, and it would return the result.
XML DOM let's you perform somewhat sql like statements against an xml document via xpath expressions. Checkout the XmlDocument class in the System.Xml namespace. You can use methods like 'SelectSingleNode', where you pass in the name of the node you want. XPath/XSLT is a really powerful language and not to difficult to learn.
tks! that made the trick..but i can see accessing XML can be a little slow..or not? also, which process is faster? using for example a database like mysql or a xml based database? i am willing to start learning about this topic so i have a few questions about it
Originally posted by PT Exorcist tks! that made the trick..but i can see accessing XML can be a little slow..or not? also, which process is faster? using for example a database like mysql or a xml based database? i am willing to start learning about this topic so i have a few questions about it
Well ... I work with XMLs only when I need quick operations . Otherwise , it's efficient to work with database . XML is slower esp when you are dumping the whole dataset content to it .It's easy to learn (actually basics stuff you have to know ) . Did this answer you question !