home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD14546252001.psc / AddProperty.cls < prev    next >
Encoding:
Visual Basic class definition  |  2001-01-08  |  1.6 KB  |  51 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4.   Persistable = 0  'NotPersistable
  5.   DataBindingBehavior = 0  'vbNone
  6.   DataSourceBehavior  = 0  'vbNone
  7.   MTSTransactionMode  = 0  'NotAnMTSObject
  8. END
  9. Attribute VB_Name = "AddProperty"
  10. Attribute VB_GlobalNameSpace = False
  11. Attribute VB_Creatable = False
  12. Attribute VB_PredeclaredId = False
  13. Attribute VB_Exposed = False
  14. 'Module Level Comment-----------------------------------------------------------
  15. '
  16. 'Project name   : XMLTree
  17. 'Module name    : AddProperty
  18. 'Classification : Class Module
  19. 'Created        : 02 January 2001
  20. 'Author         : Paul Stevens
  21. 'Description    :
  22. '
  23. 'Dependencies   : MSXML3, MSComctlLib.Treeview
  24. 'Issues         :
  25. 'Revision(s)    : Paul Stevens
  26. '-------------------------------------------------------------------------------
  27. Private Instance As Long
  28.  
  29. Public Function HasPropertys(Node As IXMLDOMNode, Treeview As Object, PropertyParentName As String)
  30. Dim Propertys As IXMLDOMNode
  31. Dim AddNode As New AddNode
  32. On Error Resume Next
  33. Set Propertys = Node
  34. Dim Counter As Long
  35.     'this will cycle through all of the nodes propertys and add them to the tree
  36.     'EX: <File Name="Test"> Name is a Property of File with a Value of "Test"
  37.     For Counter = 0 To Node.Attributes.length - 1
  38.         AddNode.AddChildNode Propertys, CurrentNode, Treeview, True, Propertys.Attributes.Item(Counter).Text, Instance
  39.     Next Counter
  40. ParsingPropertys = False
  41. End Function
  42.  
  43. Private Sub Class_Initialize()
  44.     Instance = GlobalInstance + 1
  45.     GlobalInstance = Instance
  46.     Debug.Print Instance
  47. End Sub
  48. Private Sub Class_Terminate()
  49.     GlobalInstance = GlobalInstance - 1
  50. End Sub
  51.