Mikirin
02-12-2002, 01:37 PM
This is a custom control that will take a 'pure' xml file as input, and display the contents in a TreeView.
We actually have a use for this where I work.
Its simple, its clean, the code is NOT 100% Commented.
That will be later in an actual release.
The final release will contain a myrid of XML tools, there are 2 in there now, of which only the XMLTree is functional.
The control assumes a few things.
1: You have VB (duh)
2: You have the TreeView OCX (Part of Common Controls)
3: You have MSXML Parser installed (IE 4.0 and later)
If you want to test, open the Group1.vpg file.
This containes the UserControls, and a test form.
There is one exposed custom method: XMLTreeGetFile
You can either pass it a value, or not.
If you pass a parameter, it expects the FULL path to a 'pure' XML file, as a string...
If you do NOT pass a parameter, it opens a Common Dialog when called.
i.e.
Private Sub Command1_Click()
XMLTree1.XMLTreeGetFile
'XMLTree1.XMLTreeGetFile "C:\books.xml"
End Sub
A sample XML file is included.. Its the books.xml file from the MSDN
Let me know what you think.
Thanks
Dave
We actually have a use for this where I work.
Its simple, its clean, the code is NOT 100% Commented.
That will be later in an actual release.
The final release will contain a myrid of XML tools, there are 2 in there now, of which only the XMLTree is functional.
The control assumes a few things.
1: You have VB (duh)
2: You have the TreeView OCX (Part of Common Controls)
3: You have MSXML Parser installed (IE 4.0 and later)
If you want to test, open the Group1.vpg file.
This containes the UserControls, and a test form.
There is one exposed custom method: XMLTreeGetFile
You can either pass it a value, or not.
If you pass a parameter, it expects the FULL path to a 'pure' XML file, as a string...
If you do NOT pass a parameter, it opens a Common Dialog when called.
i.e.
Private Sub Command1_Click()
XMLTree1.XMLTreeGetFile
'XMLTree1.XMLTreeGetFile "C:\books.xml"
End Sub
A sample XML file is included.. Its the books.xml file from the MSDN
Let me know what you think.
Thanks
Dave