Ok gurus
I really need some help here
I have the following XML Doc.
I need to accomplish the following:Code:<WC> - <CMS> <TYPE>PT</TYPE> <DOC_NUM>472041</DOC_NUM> <VENDOR_CODE>TX</VENDOR_CODE> - <REVIEW> <NUM>389518</NUM> <DATE>20090110</DATE> </REVIEW> <BOOK_NUM>45203</BOOK_NUM> <SUBTITLE_NUM /> <ORIG_TITLE_NUM /> <ORIG_SUBCLAIM_NUM /> <POLICY_NUM /> <JURISDICTION>TX</JURISDICTION> <PRICING>TX</PRICING> <LOSS_AMT>7100</LOSS_AMT> <EXP_AMT>190</EXP_AMT> <STATUS>FR</STATUS> <DATE>20090119</DATE> <TIME>110245</TIME> <BY>RFC_USER</BY> <REJ_REASON /> - <CHECK> <NUM /> <ISSUE_DATE /> </CHECK> <MESSAGE>not present.</MESSAGE>
when TYPE =CH and STATUS=LI then I need to get the values of REVIEW NUM and also the value of CHECK->ISSUE_DATE
here is what I have so far that is not working very well
I know is a mess , reason why I come to you for help.Code:xmldoc = New Xml.XmlDocument xmldoc.Load("c:\file.xml") xnodelist = xmldoc.GetElementsByTagName("TYPE") xnodelist2 = xmldoc.GetElementsByTagName("STATUS") 'xnodelist = xmldoc.DocumentElement.ChildNodes For Each xnode1 In xnodelist If xnode1.InnerText = "CH" Then for each xnode2 in xnodelist2 if xnode2.innerText="LI" then do something next End If End If next
Thanks




Reply With Quote