Click here to Skip to main content
15,887,585 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Function Ring Pin
Vasudevan Deepak Kumar21-Apr-08 7:15
Vasudevan Deepak Kumar21-Apr-08 7:15 
GeneralNeed Help with DSOFramer... Pin
Jats_4ru20-Apr-08 20:06
Jats_4ru20-Apr-08 20:06 
GeneralRe: Need Help with DSOFramer... Pin
saner075-Nov-12 21:16
saner075-Nov-12 21:16 
QuestionControls used to display text,image and Link Pin
vayanan20-Apr-08 19:33
vayanan20-Apr-08 19:33 
GeneralRe: Controls used to display text,image and Link Pin
Christian Graus20-Apr-08 19:45
protectorChristian Graus20-Apr-08 19:45 
QuestionWeb service not working... [modified] Pin
SamRST20-Apr-08 19:28
SamRST20-Apr-08 19:28 
GeneralRe: Web service not working... Pin
Dave Kreskowiak21-Apr-08 3:50
mveDave Kreskowiak21-Apr-08 3:50 
GeneralReading xml values using vb.net Pin
csp20-Apr-08 19:25
csp20-Apr-08 19:25 
Dim m_xmlr As XmlTextReader
m_xmlr = New XmlTextReader("C:\abc.xml")

m_xmlr.WhitespaceHandling = WhitespaceHandling.None
m_xmlr.Read()
m_xmlr.Read()

While Not m_xmlr.EOF()
'Go to the name tag
m_xmlr.Read()
'if not start element exit while loop
If Not m_xmlr.IsStartElement() Then
Exit While
End If

'Get the id Attribute Value
Dim idattribute As String = m_xmlr.GetAttribute("id")
'Read elements name,server and database
m_xmlr.Read()
'Get the name Element Value
Dim NameValue As String = m_xmlr.ReadElementString("Name")
'Get the server Element Value
Dim servervalue As String = m_xmlr.ReadElementString("Server")
'get the database element value
Dim databasevalue As String = m_xmlr.ReadElementString("DataBase")
'Write Result to the Console
txtid.Text = idattribute
txtname.Text = NameValue
txtserver.Text = servervalue
txtdb.Text = databasevalue

End While
'close the reader
m_xmlr.Close()




i have used this code its working perfectly but while loop is just taking value 2 even if i type 1 or 0;help me out


this is my xml file



<?xml version="1.0" encoding="utf-8" ?>
<Setting>
<Test id="0">
<Name>Local</Name>
<Server>Live</Server>
</Test>
</Setting>

and next test id values are 1 and 2

i had choosen this code from codeproject itself and my application is similar to that.but a small problem to read values
and iam new to site plz tell me where i can see the answers to questions which i posted.
GeneralRe: Reading xml values using vb.net Pin
Christian Graus20-Apr-08 19:49
protectorChristian Graus20-Apr-08 19:49 
GeneralRe: Reading xml values using vb.net Pin
csp21-Apr-08 20:20
csp21-Apr-08 20:20 
Questionhow to create a directory and set password to the created directory? Pin
Vikas Sashi20-Apr-08 4:40
Vikas Sashi20-Apr-08 4:40 
GeneralRe: how to create a directory and set password to the created directory? Pin
Christian Graus20-Apr-08 11:41
protectorChristian Graus20-Apr-08 11:41 
QuestionShell32.dll help please? Pin
portreathbeach20-Apr-08 4:40
portreathbeach20-Apr-08 4:40 
AnswerRe: Shell32.dll help please? Pin
portreathbeach20-Apr-08 11:32
portreathbeach20-Apr-08 11:32 
AnswerRe: Shell32.dll help please? Pin
Christian Graus20-Apr-08 11:40
protectorChristian Graus20-Apr-08 11:40 
GeneralRe: Shell32.dll help please? [modified] Pin
portreathbeach21-Apr-08 5:56
portreathbeach21-Apr-08 5:56 
GeneralRe: Shell32.dll help please? Pin
portreathbeach22-Apr-08 10:17
portreathbeach22-Apr-08 10:17 
QuestionT-SQL (VS) VB.NET Pin
Feras Mazen Taleb19-Apr-08 21:34
Feras Mazen Taleb19-Apr-08 21:34 
GeneralRe: T-SQL (VS) VB.NET Pin
Christian Graus20-Apr-08 11:33
protectorChristian Graus20-Apr-08 11:33 
GeneralApplication in languages other than english Pin
Meax19-Apr-08 21:21
Meax19-Apr-08 21:21 
GeneralRe: Application in languages other than english Pin
Rob Smiley20-Apr-08 0:25
Rob Smiley20-Apr-08 0:25 
AnswerRe: Application in languages other than english Pin
Andreas_Jonsson20-Apr-08 8:21
Andreas_Jonsson20-Apr-08 8:21 
Questioni need cod record sound in database access [modified] Pin
sarahsoso19-Apr-08 9:57
sarahsoso19-Apr-08 9:57 
GeneralRe: i need cod record sound in database access Pin
Dave Kreskowiak19-Apr-08 12:32
mveDave Kreskowiak19-Apr-08 12:32 
GeneralRe: i need cod record sound in database access Pin
leckey19-Apr-08 14:51
leckey19-Apr-08 14:51 

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.