Tutorials Infos - Anleitungen - Hilfe - Dreamcodes
 

Xml Datei

Xml-Datei lesen:

Imports System.IO
Imports System.Xml
Imports System.Console
Module XML
Sub main()
Dim doc As New XmlDocument()
doc.Load("../XmlDatei.xml")
show(doc.DocumentElement)
Console.ReadLine()
End Sub
Function show(ByVal n As XmlNode)
Dim c As XmlNode
For Each c In n.ChildNodes
WriteLine("Knoten: {0}={1}", c.Name, c.Value)
If (TypeOf c Is XmlElement) Then showattr(c)
show(c)
Next
End Function
Function showattr(ByVal k As XmlNode)
Dim a As XmlAttribute
For Each a In k.Attributes
WriteLine("--Attr {0} ist {1}", a.Name, a.Value)
Next
End Function
End Module

 
ID: 1926
eingestellt am: 25.01.2010
Autor: Keine Angabe
Status zum lesen: Gast
gelesen: 5273
Webseite: www.dreamcodes.com
[Drucken]