I have xml that looks like this
<?xml version="1.0" standalone="yes"?>
<sdnList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/sdnList.xsd">
<sdnEntry>
<uid>36</uid>
<lastName>AEROCARIBBEAN AIRLINES</lastName>
<sdnType>Entity</sdnType>
<programList>
<program>CUBA</program>
</programList>
<akaList>
<aka>
<uid>12</uid>
<type>a.k.a.</type>
<category>strong</category>
<lastName>AERO-CARIBBEAN</lastName>
</aka>
</akaList>
<addressList>
<address>
<uid>25</uid>
<city>Havana</city>
<country>Cuba</country>
</address>
</addressList>
</sdnEntry>
And the code that i am using to insert starts like this
node_list = xml_doc.SelectNodes("//sdnEntry")
For Each node In node_list
If CheckElement("lastName", node) <> "" Then
sql = "INSERT INTO us_sdnentry (uid_,lastname,sdntype) VALUES "
sql &= "('" & node.SelectNodes("./uid").Item(0).InnerText & "','" & CheckElement("lastName", node) & "','" & node.SelectNodes("./sdnType").Item(0).InnerText & "'")"
db_sql.RunSql(sql)
End If
sql = "".........
The problem is that when i am debugging, when my program executes it just skips the foreach, it dont go inside...