Click here to Skip to main content
15,893,594 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: keeping a class in scope Pin
Christian Graus25-Feb-07 10:01
protectorChristian Graus25-Feb-07 10:01 
GeneralRe: keeping a class in scope Pin
cstrader23225-Feb-07 16:22
cstrader23225-Feb-07 16:22 
GeneralRe: keeping a class in scope Pin
Christian Graus25-Feb-07 17:08
protectorChristian Graus25-Feb-07 17:08 
QuestionDatagrid and MS Access Pin
China-Gary25-Feb-07 5:19
China-Gary25-Feb-07 5:19 
QuestionCreating a Picture Box Pin
Klazen25-Feb-07 4:28
Klazen25-Feb-07 4:28 
AnswerRe: Creating a Picture Box Pin
Dave Kreskowiak25-Feb-07 6:06
mveDave Kreskowiak25-Feb-07 6:06 
GeneralRe: Creating a Picture Box Pin
Klazen25-Feb-07 9:52
Klazen25-Feb-07 9:52 
Questionxml iterator Pin
chater buster25-Feb-07 3:57
chater buster25-Feb-07 3:57 
Dear Techies

i have an xml file



<bookstore>
<book genre="autobiography" publicationdate="1981" isbn="1-861003-11-0">
<title>The Autobiography of Benjamin Franklin
<author>
<first-name>Benjamin
<last-name>Franklin

<price>8.99

<book genre="novel" publicationdate="1967" isbn="0-201-63361-2">
<title>The Confidence Man
<author>
<first-name>Herman
<last-name>Melville

<price>11.99

<book genre="philosophy" publicationdate="1991" isbn="1-861001-57-6">
<title>The Gorgias
<author>
<first-name>Sidas
<last-name>Plato

<price>9.99


**************************

I have a form that has textboxes and buttons like move first,last next previus to navigate thru xml and show the contents of the xml

the problems: when ever iterate thru loop i'm getting a loop of
"book" and value= "all attributes values concatenated"

i wanna know the to iterate each and every node of of the above xml file

Thanks in advance



btn_first code as follows...

Private Sub btnFirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFirst.Click

Dim xmldoc As XPathDocument = New XPathDocument("c:\books.xml")
Dim nav As XPathNavigator = xmldoc.CreateNavigator()
Dim itr As XPath.XPathNodeIterator = nav.Select("/bookstore")
Try

nav.MoveToRoot()
nav.MoveToFirstChild()


Do While nav.MoveToNext()
If nav.NodeType = XPathNodeType.Element Then
If nav.HasChildren = True Then
nav.MoveToFirstChild()
Do While nav.MoveToNext()
System.Diagnostics.Debug.WriteLine(nav.Name + " : " + nav.Value)
Loop

End If

End If
Loop

Catch ex As XPathException
MsgBox("The Error XPathException: " & ex.Message)
Catch ex As Xml.XmlException
MsgBox("The Error Xml : " & ex.Message)

End Try

End Sub
End Class
Questionretrieving thr Explorer folder menu. Possible? Pin
BenedictArf25-Feb-07 0:44
BenedictArf25-Feb-07 0:44 
Questionmultiple forms [modified] Pin
manni_n24-Feb-07 22:06
manni_n24-Feb-07 22:06 
AnswerRe: multiple forms Pin
JUNEYT24-Feb-07 23:54
JUNEYT24-Feb-07 23:54 
GeneralRe: multiple forms Pin
manni_n25-Feb-07 0:29
manni_n25-Feb-07 0:29 
GeneralRe: multiple forms Pin
JUNEYT25-Feb-07 1:09
JUNEYT25-Feb-07 1:09 
GeneralRe: multiple forms Pin
manni_n25-Feb-07 1:35
manni_n25-Feb-07 1:35 
GeneralRe: multiple forms Pin
Christian Graus25-Feb-07 8:48
protectorChristian Graus25-Feb-07 8:48 
GeneralRe: multiple forms Pin
JUNEYT25-Feb-07 1:21
JUNEYT25-Feb-07 1:21 
Generalits solved Pin
manni_n25-Feb-07 1:45
manni_n25-Feb-07 1:45 
GeneralRe: multiple forms [modified] Pin
TwoFaced25-Feb-07 8:21
TwoFaced25-Feb-07 8:21 
GeneralRe: multiple forms Pin
JUNEYT25-Feb-07 11:49
JUNEYT25-Feb-07 11:49 
GeneralRe: multiple forms Pin
TwoFaced25-Feb-07 14:59
TwoFaced25-Feb-07 14:59 
Generalacceptable answer Pin
JUNEYT25-Feb-07 22:59
JUNEYT25-Feb-07 22:59 
GeneralRe: acceptable answer Pin
TwoFaced26-Feb-07 13:53
TwoFaced26-Feb-07 13:53 
GeneralYour solution is not appropriate! Pin
JUNEYT26-Feb-07 23:22
JUNEYT26-Feb-07 23:22 
GeneralRe: Your solution is not appropriate! [modified] Pin
TwoFaced27-Feb-07 9:36
TwoFaced27-Feb-07 9:36 
Questionwhat is 192 bit encryption Pin
onrivman24-Feb-07 22:01
onrivman24-Feb-07 22:01 

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.