(19-05-17, 10:01 PM)alma2 كتب : المعروف ان ملف xml يبدأ بهذا Tag
لهذا لا يتم قراءته
فكيف بدأ ملفك بهذا Tag
اهلا اخي
انا اختصرة الكود
هذا الكود الكامل
كود :
<?xml version="1.0" encoding="utf-8" ?>
<QRZCQDatabase version="1.00" xmlns="http://qrzcq.com">
<Callsign>
<call>DO5SSB</call>
<dxcc>230</dxcc>
<name>Grzegorz Surmann</name>
<qth>Buchholz, near Hamburg</qth>
<address>Amselweg 1 a</address>
<city>Buchholz</city>
<zip>21244</zip>
<license>E</license>
<continent>EU</continent>
<country>Germany</country>
<state>NDS</state>
<locator>JO43WH</locator>
<latitude>53.3199308</latitude>
<longitude>9.8597973</longitude>
<website>http://do5ssb.blogspot.de/</website>
<itu>28</itu>
<cq>14</cq>
<eqsl>1</eqsl>
<lotw>0</lotw>
<bqsl>0</bqsl>
<mqsl>1</mqsl>
<utf8>0</utf8>
<qslpic>http://qrzcq.com/qslpic/do5ssb.jpg</qslpic>
<prefix>DL</prefix>
</Callsign>
<Session>
<Key>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</Key>
<Count>18232</Count>
<SubExp>Sat Mar 1 20:13:59 2014</SubExp>
<GMTime>Wed Feb 26 20:22:21 2014</GMTime>
<Remark>cpu: 0.006s</Remark>
</Session>
</QRZCQDatabase>
انا اللي يهمني اقراء هو
كود :
<call>A61BK</call>
<name>ali</name>
<qth>DUBAI</qth>
<continent>AS</continent>
<country>United Arab Emirates</country>
<state>DUBAI</state>
<locator>LL75qg</locator>
<latitude>25.266900</latitude>
<longitude>55.410140</longitude>
<itu>39</itu>
<cq>21</cq>
<qslpic>http://qrzcq.com/qslpic/a61bk.jpg</qslpic>
<prefix>A6</prefix>
علما اخي الكود اللي جربته يعمل بس يقراء اول اربع اسطر والباقي ما يقراهم ما اعرف ليش
كود :
Dim url As String = String.Format("https://www.hamqth.com/xml.php?id={0}&callsign={1} &prg=BKLOG", Label17.Text, calls.Text)
Dim document As New XmlTextReader(url)
'loop through the xml file
While (document.Read())
Dim type = document.NodeType
'if node type was element
If (type = XmlNodeType.Element) Then
'if the loop found a <FirstName> tag
If (document.Name = "adr_name") Then
Lfullname.Text = document.ReadInnerXml
End If
If (document.Name = "us_state") Then
state.Text = document.ReadInnerXml
End If
'if the loop found a <FirstName> tag
If (document.Name = "qth") Then
qth.Text = document.ReadInnerXml
End If
'if the loop found a <FirstName> tag
If (document.Name = "grid") Then
WORKinfo.GRIDSQUARE.Text = document.ReadInnerXml
End If
'if the loop found a <FirstName> tag
If (document.Name = "qsl_via") Then
WORKinfo.Lqslmgr.Text = document.ReadInnerXml
End If
'if the loop found a <FirstName> tag
If (document.Name = "latitude") Then
WORKinfo.LAT.Text = document.ReadInnerXml
End If
'if the loop found a <FirstName> tag
If (document.Name = "longitude") Then
WORKinfo.LON.Text = document.ReadInnerXml
End If
End If
End While
End Sub
بحثت عن كود اخر بس ما حصلت شي يفيدني بارك الله فيك