Greetings,
This might be a bit vague but I think its a pretty general question. I'm new to using classes (so please bear with me) and have picked up some VB script code from Adobe for working with XML in InDesign. I'm adapting the VBS to VB 6.
In VB 6 I've created a class module that will represent what Adobe terms an XML Rule. My concern is that I'm going to need a bunch of these rules and the only way I can readily see in VB 6 to create the classes is with class modules. This will create more class module files than I care to try to manage.
I've called the class module AddReturns and it has only this in it:
Is there any way to create an equivalent class/object with code like there is in VBS? I'd like to be able to create these classes in one module file that we can pick up as we create more VB projects to deal with the XML.
Many thanks,
Ken
This might be a bit vague but I think its a pretty general question. I'm new to using classes (so please bear with me) and have picked up some VB script code from Adobe for working with XML in InDesign. I'm adapting the VBS to VB 6.
In VB 6 I've created a class module that will represent what Adobe terms an XML Rule. My concern is that I'm going to need a bunch of these rules and the only way I can readily see in VB 6 to create the classes is with class modules. This will create more class module files than I care to try to manage.
I've called the class module AddReturns and it has only this in it:
Code:
Public Property Get name()
name = "AddReturns"
End Property
Public Property Get xpath()
xpath = "//*"
End Property
Public Function apply(myXMLElement, myRulesProcessor)
With myXMLElement
Rem Add a return character after the end of the XML element
Rem (this means that the return does not become part of the
Rem XML element data, but becomes text data associated with the
Rem parent XML element).
.InsertTextAsContent vbCr, idXMLElementPosition.idAfterElement
End With
Rem Enter true to stop further processing of this element.
apply = False
End Function
Is there any way to create an equivalent class/object with code like there is in VBS? I'd like to be able to create these classes in one module file that we can pick up as we create more VB projects to deal with the XML.
Many thanks,
Ken