Hey,
I'm developing a medical application. Medical data is presented in xml
files. I have to queries these xml files to retrieve some data, for example
the birthday of the patient. This is possible with this code:
XPathDocument Doc = new XPathDocument("115160760042149.xml");
XPathNavigator navigator = Doc.CreateNavigator();
XPathNodeIterator iterator =
navigator.Select("/kmehrmessage/folder/patient/birthdate/date");
string text="This is the birthday of the patient : ";
while(iterator.MoveNext())
{
text+=iterator.Current.Name;
text+=iterator.Current.Value;
}
textBox1.Text= text;
This doesn't seem to work with the official medical xml files
(115160760042149.xml) for some strange reason. I have made a xml file
(test.xml) by my own and with this one the code works perfectly. Can someone
explain to my why this works with the test.xml and doesn't work with the
115160760042149.xml while they have the same node structure?
I have made a little program to test this code:
http://www.lievenlab.easynet.be/
The 2 xml files can be found in de bin/debug directory.
Thanks for the support and your time!!
grt,
Lieven Iliano