Click here to Skip to main content
15,900,644 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionTree view Pin
lituparitosh20-Oct-05 18:55
lituparitosh20-Oct-05 18:55 
AnswerRe: Tree view Pin
DanChin23-Oct-05 3:29
DanChin23-Oct-05 3:29 
QuestionUrgent :Send Fax Automatically Without FAx Dialouge Box Pin
shashank veerkar20-Oct-05 18:13
shashank veerkar20-Oct-05 18:13 
QuestionDirectly print the form Pin
himanshu_softin20-Oct-05 16:04
himanshu_softin20-Oct-05 16:04 
QuestionVB.NET text to XML to Access Database Pin
vb_n00b20-Oct-05 15:17
sussvb_n00b20-Oct-05 15:17 
AnswerRe: VB.NET text to XML to Access Database Pin
Desert_Dude20-Oct-05 15:27
Desert_Dude20-Oct-05 15:27 
AnswerRe: VB.NET text to XML to Access Database Pin
Christian Graus20-Oct-05 15:49
protectorChristian Graus20-Oct-05 15:49 
GeneralRe: VB.NET text to XML to Access Database Pin
Desert_Dude20-Oct-05 16:14
Desert_Dude20-Oct-05 16:14 
The original text file is just a bunch of addresses. That part never sees XML.

Part one of the program takes the street number, st. name, city, state, zip and puts into a URL, calls the url as the source of the XML document. It then uses XMLtextReader to do this:
(the XML file is pretty small.... really small...why does this program chug so bad????)


Private Sub readXML(ByVal newURL As String, ByVal stnumber As Integer)

Dim anewURL As String = newURL
Dim reader As XmlTextReader = New XmlTextReader(anewURL)
Dim output As String
Dim name As String
Dim contents As String
Dim fName As String
Dim lName As String
Dim stName As String
Dim phoneNumber As String
Dim phone2 As String
Dim phone3 As String
Dim phone4 As String
Dim city As String
Dim state As String
Dim zip As Integer
Dim yesNo As String
Dim countYesNo As String
Dim contentInteger As Integer

reader.WhitespaceHandling = WhitespaceHandling.None

While reader.Read()
reader.MoveToContent()
If reader.NodeType = Xml.XmlNodeType.Element Then
name = reader.Name
contents = reader.ReadString()
reader.MoveToElement()
reader.MoveToFirstAttribute()
If name = "NAME" Then
reader.MoveToFirstAttribute()
contents = reader.ReadString()
fName = contents
End If
If name = "ADDRESS" Then
reader.MoveToFirstAttribute()
contents = reader.ReadString()
stnumber = contents
End If
Select Case name
Case "COUNT"
countYesNo = contents
Case "STATUS"
yesNo = contents
Case "LAST"
lName = contents
Case "STREET"
stName = contents
Case "CITY"
city = contents
Case "STATE"
state = contents
Case "ZIP"
zip = contents
Case "PHONE"
phoneNumber = contents
End Select
End If
End While

If yesNo = "OK" Then
addPhoneNumber(fName, lName, stnumber, stName, phoneNumber, city, state, zip)
End If


reader.Close()

End Sub


-- modified at 0:52 Friday 21st October, 2005
GeneralRe: VB.NET text to XML to Access Database Pin
Desert_Dude24-Oct-05 7:19
Desert_Dude24-Oct-05 7:19 
AnswerRe: VB.NET text to XML to Access Database Pin
S Douglas25-Oct-05 0:28
professionalS Douglas25-Oct-05 0:28 
GeneralRe: VB.NET text to XML to Access Database Pin
Desert_Dude25-Oct-05 7:39
Desert_Dude25-Oct-05 7:39 
GeneralRe: VB.NET text to XML to Access Database Pin
S Douglas26-Oct-05 1:47
professionalS Douglas26-Oct-05 1:47 
GeneralRe: VB.NET text to XML to Access Database Pin
Desert_Dude26-Oct-05 9:39
Desert_Dude26-Oct-05 9:39 
GeneralRe: VB.NET text to XML to Access Database Pin
S Douglas26-Oct-05 17:25
professionalS Douglas26-Oct-05 17:25 
GeneralRe: VB.NET text to XML to Access Database Pin
Desert_Dude27-Oct-05 6:53
Desert_Dude27-Oct-05 6:53 
GeneralRe: VB.NET text to XML to Access Database Pin
S Douglas27-Oct-05 14:27
professionalS Douglas27-Oct-05 14:27 
Questionfind record and move dataset VB.NET Pin
CritterOH20-Oct-05 14:30
CritterOH20-Oct-05 14:30 
AnswerRe: find record and move dataset VB.NET Pin
Christian Graus20-Oct-05 15:16
protectorChristian Graus20-Oct-05 15:16 
GeneralRe: find record and move dataset VB.NET Pin
CritterOH22-Oct-05 2:54
CritterOH22-Oct-05 2:54 
Questionrequired code for multi-users in vb.net Pin
u_rocky20-Oct-05 9:49
u_rocky20-Oct-05 9:49 
AnswerRe: required code for multi-users in vb.net Pin
Christian Graus20-Oct-05 10:45
protectorChristian Graus20-Oct-05 10:45 
QuestionHelp on my VB.NET Application (I'm a beginner) Pin
Kyanide20-Oct-05 7:52
Kyanide20-Oct-05 7:52 
AnswerRe: Help on my VB.NET Application (I'm a beginner) Pin
Christian Graus20-Oct-05 12:06
protectorChristian Graus20-Oct-05 12:06 
QuestionDialer Pin
nitin_ion20-Oct-05 7:36
nitin_ion20-Oct-05 7:36 
Questiondatagrid as a data entry form Pin
Anonymous20-Oct-05 7:28
Anonymous20-Oct-05 7:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.