:::: 개발 ::::/::: A S P :::

배열처리 중 특정값 삭제하기 or 변경하기

nayha 2009. 12. 28. 14:07

' include 전문 조회변수
Dim strDispKb  : strDispKb=chr(26) 
Dim strDispKb1  : strDispKb1=chr(27)
Dim strRecvData : strRecvData = ""
Dim strRecvData1 : strRecvData1 = ""
Dim objNodeList
Dim i
Dim j
Dim arrData : Redim arrData(intColCnt)

Set objNodeList = objXML.selectNodes("//" & ArrayStartCode)

For i = 0 To objNodeList.length - 1
 If objNodeList.Item(i).hasChildNodes = True Then
  For j = 1 To objNodeList.Item(i).childNodes.length - 1

'  If  j = 5 And objNodeList.Item(i).childNodes.Item(j).Text = "" Then  '  값이 없으면 0으로 셋팅
 '   strRecvData = strRecvData & "0" & strDispKb                              '변경처리
   If  j = 5 And  True Then  '                                                          5 값 삭제처리 
    strRecvData = strRecvData & " "
   ElseIf j = 7 And True Then
    strRecvData = strRecvData & " "
   Else
               'arrData(j) = arrData(j) & objNodeList.Item(i).childNodes.Item(j).Text & strDispKb  
      strRecvData = strRecvData & objNodeList.Item(i).childNodes.Item(j).Text & strDispKb
   End If
  Next

  strRecvData = strRecvData & strDispKb1
 End If
Next

반응형