Click here to Skip to main content
15,913,854 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
Dave Kreskowiak17-Dec-08 12:32
mveDave Kreskowiak17-Dec-08 12:32 
GeneralRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
astanton197818-Dec-08 4:30
astanton197818-Dec-08 4:30 
AnswerRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
Dave Kreskowiak15-Dec-08 8:39
mveDave Kreskowiak15-Dec-08 8:39 
GeneralRe: How to create a VB6 .dll object without having the .dll added as a reference? Pin
Jon_Boy15-Dec-08 8:57
Jon_Boy15-Dec-08 8:57 
QuestionSerialization Over A Network Stream Pin
Ryan Fleming15-Dec-08 3:34
Ryan Fleming15-Dec-08 3:34 
AnswerRe: Serialization Over A Network Stream Pin
Dave Kreskowiak15-Dec-08 9:17
mveDave Kreskowiak15-Dec-08 9:17 
QuestionXML Node count Pin
Shazz Rock14-Dec-08 23:30
Shazz Rock14-Dec-08 23:30 
AnswerRe: XML Node count Pin
astanton197815-Dec-08 8:15
astanton197815-Dec-08 8:15 
Assuming that People is the root of the document, you can iterate the nodes like this.
- Assumes the ID's are integers, you can change it to String if you want.
- written without syntax checking. Sorry if its a bit off, but you can get the idea.

Imports System.Xml

Private Sub CountNodes(xmlDoc as XmlDocument)
 Dim xNode as XmlNode
 Dim nodeName as String
 Dim nodeCount as Integer
 Dim listOfIDs as New List(Of Integer)

 For Each xNode in xmlDoc.DocumentElement.ChildNodes
  If String.IsNullOrEmpty(xNode.Name) = False Then
   nodeName = xNode.Name.Trim().ToLower()
   If nodeName = "person" Then
    nodeCount++
    If node.Attributes("ID") IsNot Nothing Then
     listOfIDs.Add(Convert.ToInt32(node.GetAttributeValue("ID")))
    End If 'node attr
   End If 'node name
  End If 'node has name
 Next 'xNode

End Sub


You can also use Xpath Query to do the same, or if the nodes can be nested you will need a recursive function.
GeneralRe: XML Node count Pin
Shazz Rock16-Dec-08 20:58
Shazz Rock16-Dec-08 20:58 
GeneralRe: XML Node count Pin
astanton197817-Dec-08 3:25
astanton197817-Dec-08 3:25 
QuestionAbout API call Pin
Nanda_MR14-Dec-08 21:46
Nanda_MR14-Dec-08 21:46 
AnswerRe: About API call PinPopular
Christian Graus14-Dec-08 21:48
protectorChristian Graus14-Dec-08 21:48 
GeneralRe: About API call Pin
Nanda_MR14-Dec-08 22:29
Nanda_MR14-Dec-08 22:29 
GeneralRe: About API call Pin
Christian Graus14-Dec-08 22:55
protectorChristian Graus14-Dec-08 22:55 
GeneralRe: About API call Pin
dan!sh 14-Dec-08 23:35
professional dan!sh 14-Dec-08 23:35 
GeneralRe: About API call Pin
Christian Graus15-Dec-08 10:09
protectorChristian Graus15-Dec-08 10:09 
GeneralRe: About API call Pin
Colin Angus Mackay14-Dec-08 23:10
Colin Angus Mackay14-Dec-08 23:10 
GeneralRe: About API call Pin
Christian Graus15-Dec-08 10:10
protectorChristian Graus15-Dec-08 10:10 
GeneralRe: About API call Pin
Luc Pattyn15-Dec-08 1:29
sitebuilderLuc Pattyn15-Dec-08 1:29 
QuestionAPI call from VB.net Pin
hribek2514-Dec-08 21:37
hribek2514-Dec-08 21:37 
AnswerRe: API call from VB.net Pin
Ben Fair15-Dec-08 2:02
Ben Fair15-Dec-08 2:02 
AnswerRe: API call from VB.net Pin
Thomas Stockwell17-Dec-08 5:39
professionalThomas Stockwell17-Dec-08 5:39 
QuestionConvert HTML into RTF Pin
JR21214-Dec-08 21:22
JR21214-Dec-08 21:22 
AnswerRe: Convert HTML into RTF Pin
Christian Graus14-Dec-08 21:49
protectorChristian Graus14-Dec-08 21:49 
GeneralRe: Convert HTML into RTF Pin
JR21214-Dec-08 23:11
JR21214-Dec-08 23:11 

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.