convert asp function to asp.net
i have to use this function in my asp.net. this function i have used in my asp website and that is working fine now i don;t know how to use xml and i want to convert this function in asp.net
can any body help me to convert this page in asp.net.i am very thankful to you.
=========================================
function addObject(dict, Element)
set elmData = domReq.createElement(Element)
keysAr = dict.Keys
itemsAr = dict.Items
For i = 0 To dict.Count-1
if (VarType(itemsAr(i)) <> 1) AND (VarType(itemsAr(i)) <> 0) then
if (VarType(itemsAr(i)) = 8) then
if (left(keysAr(i), 10) = "attribute:") then
elmData.setAttribute mid(keysAr(i), 11), itemsAr(i)
else
appendChild keysAr(i), itemsAr(i), elmData
end if
elseif (VarType(itemsAr(i)) = 9) then
set itemTemp = itemsAr(i)
itemAr = itemTemp.Items
keyAr = itemTemp.Keys
set elmTemp = domReq.createElement(keysAr(i))
For a = 0 To itemTemp.Count-1
if (left(keyAr(a), 10) = "attribute:") then
elmTemp.setAttribute mid(keyAr(a), 11), itemAr(i)
else
appendChild keyAr(a), itemAr(a), elmTemp
end if
Next
elmData.appendChild elmTemp
else
idArTemp = itemsAr(i)
For x = 0 To UBound(idArTemp)
set idTemp = idArTemp(x)
itemsTempAr = idTemp.Items
keysTempAr = idTemp.Keys
set elmTemp = domReq.createElement(keysAr(i))
For z = 0 To idTemp.Count-1
if (left(keysTempAr(z), 10) = "attribute:") then
elmTemp.setAttribute mid(keysTempAr(z), 11), itemsTempAr(z)
else
appendChild keysTempAr(z), itemsTempAr(z), elmTemp
end if
Next
elmData.appendChild elmTemp
Next
end if
end if
Next
elmReq.appendChild elmData
end function 'end function addObject
========================================
__________________
Devang Ajmera
sr.Software engg.
Xpanxion int pvt ltd
India.
Phone No:-+91-98903-74412(M)
MSN ID : ajmera_devang@hotmail.com
yahoo : debuajm
|