Click here to Skip to main content
16,014,765 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: textboxes Pin
Vijay V Anand12-Jun-05 19:40
Vijay V Anand12-Jun-05 19:40 
GeneralRe: textboxes Pin
toxcct12-Jun-05 20:36
toxcct12-Jun-05 20:36 
GeneralRe: textboxes Pin
Rizwan Bashir12-Jun-05 21:35
Rizwan Bashir12-Jun-05 21:35 
GeneralRe: textboxes Pin
Yulianto.12-Jun-05 22:01
Yulianto.12-Jun-05 22:01 
GeneralRe: textboxes Pin
Makniteasy14-Jun-05 16:03
Makniteasy14-Jun-05 16:03 
GeneralRe: textboxes Pin
Yulianto.14-Jun-05 16:15
Yulianto.14-Jun-05 16:15 
GeneralVBNET/Office/Win98 Pin
amcatellani12-Jun-05 9:08
amcatellani12-Jun-05 9:08 
GeneralVB.NET Search, Read and Write XML Pin
coleman0112-Jun-05 4:40
coleman0112-Jun-05 4:40 
Hi,
Im trying to search through an XML file. When it finds the record it needs it then updates a specific field in that record. I have made it find the specified record but do not know how to update it and write it back to file. I am new to XML coding. Any help would be most appreciated.

Dim xpathDoc As XPathDocument
Dim xmlNav As XPathNavigator
Dim xmlNI As XPathNodeIterator
Dim filePath As New OpenFileDialog

filePath.ShowDialog()
xpathDoc = New XPathDocument(filePath.FileName)
xmlNav = xpathDoc.CreateNavigator()
xmlNI = xmlNav.Select("/Message/Pupils/PupilCode")

While (xmlNI.MoveNext())
System.Console.WriteLine(xmlNI.Current.Name + " : " + xmlNI.Current.Value)

If (xmlNI.Current.Value) = "A123981456002" Then

'ONCE ITS FOUND THE RECORD - DISPLAY A MESSAGE
'SELECT THE DIFFERENT FIELD WITHIN THE RECORD
MsgBox("Found")
xmlNav.Select("/Message/Pupils/PupilAge")
'THIS IS WHERE IT NEEDS TO UPDATE IT. NO IDEA HOW TO DO THIS BIT
End If
End While


This may be the wrong way to do it - I'm not sure. I just need it to search for a specific pupil ID and update their age with a specified value. After that it has to write the entire XML file to a new file.

Many thanks.
Chris
GeneralRe: VB.NET Search, Read and Write XML Pin
KaptinKrunch12-Jun-05 15:50
KaptinKrunch12-Jun-05 15:50 
GeneralAbout anti virus protection Pin
Vijay V Anand12-Jun-05 1:34
Vijay V Anand12-Jun-05 1:34 
GeneralRe: About anti virus protection Pin
Dave Kreskowiak12-Jun-05 4:03
mveDave Kreskowiak12-Jun-05 4:03 
GeneralRe: About anti virus protection Pin
S. Senthil Kumar12-Jun-05 5:50
S. Senthil Kumar12-Jun-05 5:50 
GeneralOffice Com Addins similar to find and replace dialog Pin
Anonymous11-Jun-05 23:45
Anonymous11-Jun-05 23:45 
GeneralProblems with "ã", "ç", "õ" etc.. Pin
Member 202980111-Jun-05 19:43
Member 202980111-Jun-05 19:43 
GeneralRe: Problems with "ã", "ç", "õ" etc.. Pin
12-Jun-05 15:39
suss12-Jun-05 15:39 
GeneralData List Delema Pin
erikkl200011-Jun-05 17:24
erikkl200011-Jun-05 17:24 
GeneralRe: Data List Delema Pin
Scott Serl12-Jun-05 0:38
Scott Serl12-Jun-05 0:38 
GeneralEXPORTING CRYSTAL REPORTS! HELP ME! PLEASE! Pin
mizu_chil11-Jun-05 15:46
mizu_chil11-Jun-05 15:46 
GeneralRe: EXPORTING CRYSTAL REPORTS! HELP ME! PLEASE! Pin
Yulianto.12-Jun-05 22:10
Yulianto.12-Jun-05 22:10 
GeneralRe: EXPORTING CRYSTAL REPORTS! HELP ME! PLEASE! Pin
Anonymous13-Jun-05 2:18
Anonymous13-Jun-05 2:18 
GeneralRe: EXPORTING CRYSTAL REPORTS! HELP ME! PLEASE! Pin
Yulianto.13-Jun-05 16:59
Yulianto.13-Jun-05 16:59 
QuestionAdd DLL reference during runtime? Pin
Chemisus11-Jun-05 8:32
Chemisus11-Jun-05 8:32 
AnswerRe: Add DLL reference during runtime? Pin
S. Senthil Kumar12-Jun-05 5:53
S. Senthil Kumar12-Jun-05 5:53 
GeneralAuto Number Generator Pin
LordLothar11-Jun-05 5:41
LordLothar11-Jun-05 5:41 
GeneralRe: Auto Number Generator Pin
Robert Rohde11-Jun-05 20:37
Robert Rohde11-Jun-05 20:37 

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.