How do I select Party ID using for each loop? RRS feed

  • Question

  • I have a xml document that I am using for each to loop through parties. I need to get partyID and date of birth. I am getting partyID but date of birth is showing 0001-01-01T00:00:00.

    XML Document

    		<CaseEvent Date="06/14/2010" ID="252945068">
    		<CaseParty ID="9919636">
    		<IntegrationCondition Word="TAWQ" Description="Inserts">
    			<NotificationEvent notificationType="TAWQ" elementKey="252945068">InsertSomething</NotificationEvent>

    Result which is not showing DateOfBirth

    <InsertPWBRorAOS xmlns:xsd="" xmlns:xsi="" xmlns="">

    Expected result

    <InsertPWBRorAOS xmlns:xsd="" xmlns:xsi="" xmlns="">

    VB.Net code

    Public Shared Sub ProcessInsertPWBRorAOS(ByRef aobjXmlInputDoc As System.Xml.XmlDocument, ByVal aobjxmlNotificationEventNode As XmlNode)
    Dim objInsertPWBRorAOS As MMGService.InsertPWBRorAOS = New MMGService.InsertPWBRorAOS
    Dim objCaseParty As MMGService.CaseParty
    Dim objxmlEventPartyIDNode As XmlNode
    Dim strEventId As String
    strEventId = aobjxmlNotificationEventNode.SelectSingleNode("@elementKey").InnerText
    objCaseParty = New MMGService.CaseParty()
    'Loop through all PartyIDNodes in CaseEvent with ID equal to NotificationEvent's elementKey 
    For Each objxmlEventPartyIDNode In aobjXmlInputDoc.DocumentElement.SelectNodes("Case/CaseEvent[@ID=" + strEventId + "]/PartyID")
    	strPartyID = objxmlEventPartyIDNode.InnerText
        objCaseParty.PartyId = strPartyID
        objCaseParty.DateOfBirth = dtmDateOfBirth
        objInsertPWBRorAOS.RelatedParties(i) = objCaseParty
        i += 1
    End Sub

    Monday, July 15, 2019 5:13 PM