473,395 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Please help me...

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="utf-8" ?> 
  2.   <string xmlns="http://tempuri.org/"><?xml version="1.0" encoding="utf-8"?><BTV><BTV_Input_Clinical><paramInput1 Name="EventCode">A03</paramInput1><paramInput2 Name="LastExecDateTime">2000/6/2</paramInput2></BTV_Input_Clinical><BTV_Output_Clinical>
  3. <Clinical_Data><Row0><EID>HJKL-GFHJ-AZCD-1234</EID><MRN>200004</MRN><PhysicianID>XA12345</PhysicianID></Row0><Row1><EID>MKLM-GFHJ-AZCD-1234</EID><MRN>200006</MRN><PhysicianID>XA12345</PhysicianID></Row1><Row2><EID>NNNN-GFHJ-AZCD-1234</EID><MRN>200005</MRN><PhysicianID>XA12345</PhysicianID></Row2><Row3><EID>QWER-GFHJ-AZCD-1234</EID><MRN>200003</MRN><PhysicianID>XA12345</PhysicianID></Row3><Row4><EID>SSUD-GFHJ-AZCD-1234</EID><MRN>2003</MRN><PhysicianID>XA12345</PhysicianID></Row4><Row5><EID>ZXSE-GFHJ-AZCD-1234</EID><MRN>200002</MRN><PhysicianID>XA12345</PhysicianID></Row5></Clinical_Data><Status>Success</Status><Message>Data Retrived Successfully</Message></BTV_Output_Clinical></BTV></string> 
Above string is in xml format.Now i want to traverse through string and store the values of EID,MRN and physician ID in a variable and pass this three variables to stored proecdure which are its input parameter.In the above string there are 5 Rows which contain the data.My c# code should fetch EID ,MRN and Physician ID from Row 0.this values should be passed to stored proecdure.Once it gets executed it should fetch the data from ROW 1 and do the same..This behaviour should be repeated till Row 6 is traversed.

PLease help me urgently..I am stuck up...
Aug 15 '10 #1
1 1149
Sfreak
64
Sudhin,

There are many ways to parse an XML file. One way is using XmlNodeList as the example below:

Expand|Select|Wrap|Line Numbers
  1. private XmlDocument XmlFile = new XmlDocument();
  2.  if (openFileDialog.ShowDialog() == DialogResult.OK)
  3.             {
  4.                 this.XmlFile.Load(openFileDialog.FileName);
  5.             }
  6. XmlNodeList NodeList = XmlFile.GetElementsByTagName("TagName1");
  7.             foreach (XmlNode node in NodeList)
  8.             {
  9.                 XmlElement element = (XmlElement)node;
  10.                 MessageBox.Show(element.GetElementsByTagName("TagName")[0].InnerText);
  11.                 MessageBox.Show(element.GetElementsByTagName("TagName2")[0].InnerText);
  12.             }
Hope this can help you...

Fernando Mello
Aug 16 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: HolaGoogle | last post by:
Hi all, Please help me with the following..it's realy urgent and i tried everything i could and i can't get it work properly!! Thanks in advance. Here's what i'm trying to accomplish: in my...
2
by: rked | last post by:
I get nameSPAN1 is undefined when I place cursor in comments box.. <%@ LANGUAGE="VBScript" %> <% DIM ipAddress ipAddress=Request.Servervariables("REMOTE_HOST") %> <html> <head> <meta...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
4
by: pshindle | last post by:
DB2 Team - I just downloaded and unzipped the new Fixpack 9 for DB2 ESE V8 for Windows (FP9_WR21350_ESE.exe). I then burned the unzipped Fixpack files to a CD. I proceded to install this...
1
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.