Hi
I have a xml file that I read to save data in db table
The section of sql that gives problem is like that:
<AltriDatiGestionali>
<TipoDato>Cod: 1</TipoDato>
<RiferimentoTesto>GAS</RiferimentoTesto>
</AltriDatiGestionali>
-<AltriDatiGestionali>
<TipoDato>Cod: 1</TipoDato>
<RiferimentoTesto>GAS</RiferimentoTesto>
</AltriDatiGestionali>
I need to save both data present in the "AltriDatiGestionali" section..In some case the second GAS should not be present..
Is there a way to do so?
I'm using this code but it down't works correctly..If the second section is not present GAS1 (second variable) always is valorized
for each child in x.ChildNodes
NODE1=child.nodename
NODE2=child.text
'----------------------------------------------
if NODE1="AltriDatiGestionali" then
IF NODE2<>"" AND MID(NODE2,1,6)="Cod: 1" AND CONTAGAS=0 THEN
GAS=NODE2
msgbox("GAS= "&GAS )
CONTAGAS=CONTAGAS+1
END IF
End If
'----------------------------------------------
if NODE1="AltriDatiGestionali" then
IF NODE2<>"" AND MID(NODE2,1,6)="Cod: 1" AND CONTAGAS=1 THEN
GAS1=NODE2
msgbox("GAS1= "&GAS1 )
END IF
End If
I have a xml file that I read to save data in db table
The section of sql that gives problem is like that:
<AltriDatiGestionali>
<TipoDato>Cod: 1</TipoDato>
<RiferimentoTesto>GAS</RiferimentoTesto>
</AltriDatiGestionali>
-<AltriDatiGestionali>
<TipoDato>Cod: 1</TipoDato>
<RiferimentoTesto>GAS</RiferimentoTesto>
</AltriDatiGestionali>
I need to save both data present in the "AltriDatiGestionali" section..In some case the second GAS should not be present..
Is there a way to do so?
I'm using this code but it down't works correctly..If the second section is not present GAS1 (second variable) always is valorized
for each child in x.ChildNodes
NODE1=child.nodename
NODE2=child.text
'----------------------------------------------
if NODE1="AltriDatiGestionali" then
IF NODE2<>"" AND MID(NODE2,1,6)="Cod: 1" AND CONTAGAS=0 THEN
GAS=NODE2
msgbox("GAS= "&GAS )
CONTAGAS=CONTAGAS+1
END IF
End If
'----------------------------------------------
if NODE1="AltriDatiGestionali" then
IF NODE2<>"" AND MID(NODE2,1,6)="Cod: 1" AND CONTAGAS=1 THEN
GAS1=NODE2
msgbox("GAS1= "&GAS1 )
END IF
End If