Follow up to This Question This Question
I took some very good advice and changed my code around a little bit and eliminated some If
statements.
I am not retrieving very much information but it looks so skinny now.
Is this a good thing? Is there something that I should add to the code?
Dim phoneNode
Dim phoneNodeList
ReturnData = ""
Set phoneNodeList = XmlDoc.SelectNodes("/Record/Case/CaseFormsLoad/PartyLoad/Party/PartyPhones/Phone")
If phoneNodeList.Length > 0 Then
For Each phoneNode In phoneNodeList
If phoneNode.GetAttribute("ConfidentialFlag") = "True" Then
ReturnData = ReturnData & phoneNode.Getattribute("PhoneNum") & VbCrLf
End If
Next
End If
This code is very readable and simple. Is there anything that I can do to make it shorter, and should I make it shorter? it is a Script and not a fully compiled code.
Follow up to This Question
I took some very good advice and changed my code around a little bit and eliminated some If
statements.
I am not retrieving very much information but it looks so skinny now.
Is this a good thing? Is there something that I should add to the code?
Dim phoneNode
Dim phoneNodeList
ReturnData = ""
Set phoneNodeList = XmlDoc.SelectNodes("/Record/Case/CaseFormsLoad/PartyLoad/Party/PartyPhones/Phone")
If phoneNodeList.Length > 0 Then
For Each phoneNode In phoneNodeList
If phoneNode.GetAttribute("ConfidentialFlag") = "True" Then
ReturnData = ReturnData & phoneNode.Getattribute("PhoneNum") & VbCrLf
End If
Next
End If
This code is very readable and simple. Is there anything that I can do to make it shorter, and should I make it shorter? it is a Script and not a fully compiled code.
Follow up to This Question
I took some very good advice and changed my code around a little bit and eliminated some If
statements.
I am not retrieving very much information but it looks so skinny now.
Is this a good thing? Is there something that I should add to the code?
Dim phoneNode
Dim phoneNodeList
ReturnData = ""
Set phoneNodeList = XmlDoc.SelectNodes("/Record/Case/CaseFormsLoad/PartyLoad/Party/PartyPhones/Phone")
If phoneNodeList.Length > 0 Then
For Each phoneNode In phoneNodeList
If phoneNode.GetAttribute("ConfidentialFlag") = "True" Then
ReturnData = ReturnData & phoneNode.Getattribute("PhoneNum") & VbCrLf
End If
Next
End If
This code is very readable and simple. Is there anything that I can do to make it shorter, and should I make it shorter? it is a Script and not a fully compiled code.
Still pulling information from XML to insert into Word Document inside 3rd party application
Follow up to This Question
I took some very good advice and changed my code around a little bit and eliminated some If
statements.
I am not retrieving very much information but it looks so skinny now.
Is this a good thing? Is there something that I should add to the code?
Dim phoneNode
Dim phoneNodeList
ReturnData = ""
Set phoneNodeList = XmlDoc.SelectNodes("/Record/Case/CaseFormsLoad/PartyLoad/Party/PartyPhones/Phone")
If phoneNodeList.Length > 0 Then
For Each phoneNode In phoneNodeList
If phoneNode.GetAttribute("ConfidentialFlag") = "True" Then
ReturnData = ReturnData & phoneNode.Getattribute("PhoneNum") & VbCrLf
End If
Next
End If
This code is very readable and simple. Is there anything that I can do to make it shorter, and should I make it shorter? it is a Script and not a fully compiled code.