Library code snippets
XBrowse
By J P, published on 22 Mar 2003
XBrowse is a small application that allows the user to view and edit XML files as well as extract XSD schema files from the XML document. It is overall a pretty simple program that is based off of a code snippet in the VS.Net IDE.
Related articles
Related discussion
-
Creating a Windows Service in VB.NET
by davidvanr (108 replies)
-
Watching Folder Activity in VB.NET
by emmaddai (17 replies)
-
how to play and convert movies in vb.net
by shahid123 (0 replies)
-
write to XML file vb.net
by acnetonline (2 replies)
-
help with vb.net and xml
by konikula (1 replies)
Related podcasts
-
LINQ to XML
Scott's been poking around with LINQ to XML and reports his findings to Carl about life with XDocuments and XElements. They also talk about the bridge classes that link (no pun intended) System.Xml and System.Xml.Linq.
I modified the code to accept an XML string instead of opening a file.
Public Message As String
Public Sub LoadXML()
Dim d As New DataSet() 'Dim local dataset object for this method
Try
Dim XmlDataDocument As New XmlDataDocument
XmlDataDocument.DataSet.ReadXml(New IO.StringReader(Message))
d = XmlDataDocument.DataSet.Copy
dg1.DataSource = d ' bind datagrid control to the local dataset object
Catch exp As Exception ' catch any exceptions that may get thrown and display in messagebox
MessageBox.Show(exp.Message.ToString, "Exception was caught", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
ds = d.Copy 'copy local dataset object up to global dataset for persistance
dg1.DataSource = ds 'reset datagrid datasource property to global dataset object
dg1.Refresh() 'refresh datagrid
dg1.Collapse(-1) 'collapse datagrid to get back to root node
d.Dispose() ' dispose of local dataset object
End Sub
This thread is for discussions of XBrowse.