| 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 = "Element" |
| 10 |
Attribute VB_GlobalNameSpace = False |
| 11 |
Attribute VB_Creatable = False |
| 12 |
Attribute VB_PredeclaredId = False |
| 13 |
Attribute VB_Exposed = True |
| 14 |
'* |
| 15 |
'* Copyright (c) 2000, 2001 Mihayl Stamenov <michael.stamenov@web.de> |
| 16 |
'* |
| 17 |
'* This program is free software; you can redistribute it and/or modify |
| 18 |
'* it under the terms of the GNU General Public License as published by |
| 19 |
'* the Free Software Foundation; either version 2, or (at your option) |
| 20 |
'* any later version. |
| 21 |
'* |
| 22 |
'* This program is distributed in the hope that it will be useful, |
| 23 |
'* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 24 |
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 25 |
'* GNU General Public License for more details. |
| 26 |
'* |
| 27 |
'* You should have received a copy of the GNU General Public License |
| 28 |
'* along with this program; see the file COPYING. If not, write to |
| 29 |
'* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 30 |
'* |
| 31 |
|
| 32 |
'=============================================================================== |
| 33 |
' Name: Element |
| 34 |
' Purpose: �G�������g�I�u�W�F�N�g���\���������B |
| 35 |
' Remarks: ��������MSXML��IXMLDOMElement�N���X�����������v���p�e�B�A���\�b�h�A�C�x���g�����������������������������������B |
| 36 |
' IXMLDOMNode��IXMLDOMAttribute�m�[�h�����[�������B |
| 37 |
' Functions: |
| 38 |
' Properties: |
| 39 |
' Methods: |
| 40 |
' Started: 2001/02/30 |
| 41 |
' Modified: 2001/02/30 |
| 42 |
'=============================================================================== |
| 43 |
Option Explicit |
| 44 |
|
| 45 |
'=============================================================================== |
| 46 |
' Name: Sub setNew |
| 47 |
' Input: |
| 48 |
' ByVal blnIsNew As Boolean - �G�������g���V�K�����������w���������B |
| 49 |
' Output: |
| 50 |
' ���� |
| 51 |
' Purpose: �V���������������I�u�W�F�N�g�������I�u�W�F�N�g�������������B |
| 52 |
' Remarks: �������m�[�h�������������������t���O�������G�������g���������������g�p���������B |
| 53 |
' �����t���O��INSERT��UPDATE�����������������g�p���������B |
| 54 |
'=============================================================================== |
| 55 |
Friend Sub setNew(ByVal blnIsNew As Boolean) |
| 56 |
End Sub |
| 57 |
|
| 58 |
'=============================================================================== |
| 59 |
' Name: Sub setTag |
| 60 |
' Input: |
| 61 |
' ByVal strTagName As String - �G�������g�����O���w���������B |
| 62 |
' Output: |
| 63 |
' ���� |
| 64 |
' Purpose: �G�������g�����O�������������B |
| 65 |
' Remarks: �f�[�^�x�[�X�e�[�u�������O�L�������������������g�p���������B |
| 66 |
'=============================================================================== |
| 67 |
Friend Sub setTag(ByVal strTagName As String) |
| 68 |
End Sub |
| 69 |
|
| 70 |
'=============================================================================== |
| 71 |
' Name: Sub setDefAttribute |
| 72 |
' Input: |
| 73 |
' ByVal strAttributeName As String - �f�t�H���g�������������������O���w���������B |
| 74 |
' Output: |
| 75 |
' ���� |
| 76 |
' Purpose: �G�������g���e�L�X�g�����������������������O�������������B |
| 77 |
' Remarks: Attribute�m�[�h�G�~�����[�V���������������������O�����������������A�������g�p���������B |
| 78 |
' <p>�G�������g�e�L�X�g�itext()�j���G�~�����[�g������. �����������e�L�X�g�m�[�h�����������������������������B |
| 79 |
'=============================================================================== |
| 80 |
Friend Sub setDefAttribute(ByVal strAttributeName As String) |
| 81 |
End Sub |
| 82 |
|
| 83 |
'=============================================================================== |
| 84 |
' Name: Let id |
| 85 |
' Input: |
| 86 |
' ByVal strId As String - �G�������g��ID���w���������B |
| 87 |
' Output: |
| 88 |
' ���� |
| 89 |
' Purpose: �G�������g��ID�������������B |
| 90 |
' Remarks: ID���f�[�^�x�[�X�������G�������g�����L�[�����B |
| 91 |
' ID���e�[�u�������g���G�������g�������������������B |
| 92 |
'=============================================================================== |
| 93 |
Friend Property Let id(ByVal strId As String) |
| 94 |
End Property |
| 95 |
|
| 96 |
'=============================================================================== |
| 97 |
' Name: Sub restore |
| 98 |
' Input: |
| 99 |
' ���� |
| 100 |
' Output: |
| 101 |
' ���� |
| 102 |
' Purpose: �o�b�N�A�b�v���g�p�������O���o�b�N�A�b�v�����G�������g�������������������B |
| 103 |
' Remarks: �g�����U�N�V�������[���o�b�N�����������������������g�p���������B |
| 104 |
'=============================================================================== |
| 105 |
Friend Sub restore() |
| 106 |
End Sub |
| 107 |
|
| 108 |
'=============================================================================== |
| 109 |
' Name: Sub reload |
| 110 |
' Input: |
| 111 |
' ���� |
| 112 |
' Output: |
| 113 |
' ���� |
| 114 |
' Purpose: �f�[�^�x�[�X�����f�[�^�����������������B |
| 115 |
' Remarks: �g�����U�N�V�������R���e�L�X�g�����f�[�^�x�[�X���f�[�^���������������O�� |
| 116 |
' �I�u�W�F�N�g���f�[�^���X�V���������g�p���������B |
| 117 |
'=============================================================================== |
| 118 |
Friend Sub reload() |
| 119 |
End Sub |
| 120 |
|
| 121 |
'=============================================================================== |
| 122 |
' Name: Set ownerDocument |
| 123 |
' Input: |
| 124 |
' ByRef doc As Document - �h�L�������g�I�u�W�F�N�g�����Q�����w���������B |
| 125 |
' Output: |
| 126 |
' ���� |
| 127 |
' Purpose: �I�[�i�[�h�L�������g�I�u�W�F�N�g�����Q���������������B |
| 128 |
' Remarks: ���� |
| 129 |
'=============================================================================== |
| 130 |
Friend Property Set ownerDocument(ByRef doc As Document) |
| 131 |
End Property |
| 132 |
|
| 133 |
'=============================================================================== |
| 134 |
' Name: Get ownerDocument |
| 135 |
' Input: |
| 136 |
' ���� |
| 137 |
' Output: |
| 138 |
' Document - �h�L�������g�I�u�W�F�N�g�����Q���B |
| 139 |
' Purpose: �I�[�i�[�h�L�������g�I�u�W�F�N�g�����Q�������������B |
| 140 |
' Remarks: ���� |
| 141 |
'=============================================================================== |
| 142 |
Public Property Get ownerDocument() As Document |
| 143 |
End Property |
| 144 |
|
| 145 |
'=============================================================================== |
| 146 |
' Name: Get text |
| 147 |
' Input: |
| 148 |
' ���� |
| 149 |
' Output: |
| 150 |
' String - �m�[�h�����e���e�L�X�g�\���B |
| 151 |
' Purpose: �����m�[�h���e�L�X�g�R���e���c���\�����������������������B |
| 152 |
' Remarks: ���� |
| 153 |
'=============================================================================== |
| 154 |
Public Property Get text() As String |
| 155 |
End Property |
| 156 |
|
| 157 |
'=============================================================================== |
| 158 |
' Name: Let text |
| 159 |
' Input: |
| 160 |
' ByVal strNewText As String - �����m�[�h���e�L�X�g�R���e���c���\�������������B |
| 161 |
' �����l���m�[�h�^�C�v���l�������������������B |
| 162 |
' Output: |
| 163 |
' ���� |
| 164 |
' Purpose: �����m�[�h���e�L�X�g�R���e���c�������������B |
| 165 |
' Remarks: ���� |
| 166 |
'=============================================================================== |
| 167 |
Public Property Let text(ByVal strNewText As String) |
| 168 |
End Property |
| 169 |
|
| 170 |
'=============================================================================== |
| 171 |
' Name: Get parentNode |
| 172 |
' Input: |
| 173 |
' ���� |
| 174 |
' Output: |
| 175 |
' Element - �^���������m�[�h�C���X�^���X���e�B�������A�m�[�h������������������ |
| 176 |
' �����c���[�����������������������A���������c���[�������������������������A�e��Nothing�����������B |
| 177 |
' Purpose: �e�m�[�h����������(�e�������������������m�[�h��������)�B |
| 178 |
' Remarks: ���� |
| 179 |
'=============================================================================== |
| 180 |
Public Property Get parentNode() As Element |
| 181 |
End Property |
| 182 |
|
| 183 |
'=============================================================================== |
| 184 |
' Name: Function appendChild |
| 185 |
' Input: |
| 186 |
' ByVal newChild As Element - �����m�[�h���q�����X�g�����������������V�����q�m�[�h�����Q���B |
| 187 |
' Output: |
| 188 |
' Element - ���X�g���������������������V�����q�m�[�h�i�������j�B |
| 189 |
' Nothing���������I�u�W�F�N�g���������������������B |
| 190 |
' Purpose: �����m�[�h���������q�������V�����q�������������B |
| 191 |
' Remarks: �m�[�h�I�[�_�[���������������������B |
| 192 |
'=============================================================================== |
| 193 |
Public Function appendChild(ByVal newChild As Element) As Element |
| 194 |
End Function |
| 195 |
|
| 196 |
'=============================================================================== |
| 197 |
' Name: Function removeChild |
| 198 |
' Input: |
| 199 |
' ByVal childNode As Element - �����m�[�h���q�m�[�h�����X�g�������������q�m�[�h�B |
| 200 |
' Output: |
| 201 |
' Element - ���������q�m�[�h�BNothing�������������������������B |
| 202 |
' Purpose: �q�m�[�h�����X�g�����w�������q�m�[�h�����������A���������������B |
| 203 |
' Remarks: ���� |
| 204 |
'=============================================================================== |
| 205 |
Public Function removeChild(ByVal childNode As Element) As Element |
| 206 |
End Function |
| 207 |
|
| 208 |
'=============================================================================== |
| 209 |
' Name: Function getAttribute |
| 210 |
' Input: |
| 211 |
' ByVal name As String - �����������������O |
| 212 |
' Output: |
| 213 |
' String - �����l�������������Bname�������w���������������������f�t�H���g�l�������������������������B |
| 214 |
' Purpose: ���O�������������l�������������B |
| 215 |
' Remarks: ���� |
| 216 |
'=============================================================================== |
| 217 |
Public Function getAttribute(ByVal name As String) As String |
| 218 |
End Function |
| 219 |
|
| 220 |
'=============================================================================== |
| 221 |
' Name: Function setAttribute |
| 222 |
' Input: |
| 223 |
' ByVal name As String - �����������������O�B |
| 224 |
' ByVal value As String - �������l�B�������������������������l���X�V���������B |
| 225 |
' Output: |
| 226 |
' ���� |
| 227 |
' Purpose: ���O�������������l�������������B |
| 228 |
' Remarks: ���������������������A���������������B |
| 229 |
'=============================================================================== |
| 230 |
Public Sub setAttribute(ByVal name As String, ByVal value As String) |
| 231 |
End Sub |
| 232 |
|
| 233 |
'=============================================================================== |
| 234 |
' Name: Function selectNodes |
| 235 |
' Input: |
| 236 |
' ByVal queryString As String - �����m�[�h�����������`�������R���e�L�X�g���K�p������XSL��������XPath���B |
| 237 |
' XSL��XPath�N�G�������������g�p����������SelectionLanguage�v���p�e�B���l���������������������B |
| 238 |
' �f�t�H���g��������XSL�p�^�[���N�G�������BSelectionLanguage�v���p�e�B��SetProperty���\�b�h���������������B |
| 239 |
' Output: |
| 240 |
' NodeList - XSL��XPath���������I���������m�[�h�����X�g�B |
| 241 |
' �����A�N�G�����������I���������m�[�h�����������A�����m�[�h���X�g�����������B |
| 242 |
' Purpose: �����m�[�h�R���e�L�X�g���w���������p�^�[���}�b�`���O�������K�p���A |
| 243 |
' �}�b�`�����m�[�h�����X�g�����������B |
| 244 |
' Remarks: SelectionLanguage �� SetProperty �v���p�e�B���������������������B |
| 245 |
'=============================================================================== |
| 246 |
Public Function selectNodes(ByVal queryString As String) As NodeList |
| 247 |
End Function |
| 248 |
|
| 249 |
'=============================================================================== |
| 250 |
' Name: Function selectSingleNode |
| 251 |
' Input: |
| 252 |
' ByVal queryString As String - �����m�[�h�����������`�������R���e�L�X�g���K�p������XSL��������XPath�N�G�����w�������������B |
| 253 |
' XSL��XPath�N�G�������������g�p����������SelectionLanguage�v���p�e�B���l���������������������B |
| 254 |
' �f�t�H���g��������XSL�p�^�[���N�G�������BSelectionLanguage�v���p�e�B��SetProperty���\�b�h���������������B |
| 255 |
' Output: |
| 256 |
' Element - XPath�N�G�����������I���������������m�[�h�B�N�G�������P������������������������Nothing�����������B |
| 257 |
' Purpose: �����m�[�h���R���e�L�X�g���w���������p�^�[�����K�p���A |
| 258 |
' �������}�b�`�����m�[�h�����������B |
| 259 |
' Remarks: SelectionLanguage �� SetProperty �v���p�e�B���������������������B |
| 260 |
'=============================================================================== |
| 261 |
Public Function selectSingleNode(ByVal queryString As String) As Element |
| 262 |
End Function |
| 263 |
|
| 264 |
'=============================================================================== |
| 265 |
' Name: Sub load |
| 266 |
' Input: |
| 267 |
' ���� |
| 268 |
' Output: |
| 269 |
' ���� |
| 270 |
' Purpose: �f�[�^�x�[�X�����������A�l�A�^���������������B |
| 271 |
' Remarks: ���� |
| 272 |
'=============================================================================== |
| 273 |
Private Sub load() |
| 274 |
End Sub |
| 275 |
|
| 276 |
'=============================================================================== |
| 277 |
' Name: Sub insertElement |
| 278 |
' Input: |
| 279 |
' ���� |
| 280 |
' Output: |
| 281 |
' ���� |
| 282 |
' Purpose: �����l���R���N�V�����������f�[�^�����f�[�^�x�[�X���V�K�����R�[�h���}���������B |
| 283 |
' Remarks: ���� |
| 284 |
'=============================================================================== |
| 285 |
Private Sub insertElement() |
| 286 |
End Sub |
| 287 |
|
| 288 |
'=============================================================================== |
| 289 |
' Name: Sub updateElement |
| 290 |
' Input: |
| 291 |
' ���� |
| 292 |
' Output: |
| 293 |
' ���� |
| 294 |
' Purpose: �I�u�W�F�N�g�����f�[�^�����f�[�^�x�[�X���X�V�������B |
| 295 |
' Remarks: ���� |
| 296 |
'=============================================================================== |
| 297 |
Private Sub updateElement() |
| 298 |
End Sub |
| 299 |
|
| 300 |
'=============================================================================== |
| 301 |
' Name: Sub deleteElement |
| 302 |
' Input: |
| 303 |
' ���� |
| 304 |
' Output: |
| 305 |
' ���� |
| 306 |
' Purpose: �f�[�^�x�[�X�����m�[�h�������������B |
| 307 |
' Remarks: ���g�p |
| 308 |
'=============================================================================== |
| 309 |
Private Sub deleteElement() |
| 310 |
End Sub |
| 311 |
|
| 312 |
'=============================================================================== |
| 313 |
' Name: Sub updateAttribute |
| 314 |
' Input: |
| 315 |
' ByVal strName As String - �X�V�������������O |
| 316 |
' Output: |
| 317 |
' ���� |
| 318 |
' Purpose: �f�[�^�x�[�X�����������O�t�����������l���X�V�������B |
| 319 |
' Remarks: id���������X�������������A |
| 320 |
' �h�L�������g�I�u�W�F�N�g���L���b�V�����X�V�������B |
| 321 |
'=============================================================================== |
| 322 |
Private Sub updateAttribute(ByVal strName As String) |
| 323 |
End Sub |
| 324 |
|
| 325 |
'=============================================================================== |
| 326 |
' Name: Sub backup |
| 327 |
' Input: |
| 328 |
' ByVal toBackup As Boolean - True���������������I�u�W�F�N�g�f�[�^�����I�������������������B |
| 329 |
' False�����������I�X�g���[�W�����������������B |
| 330 |
' Output: |
| 331 |
' ���� |
| 332 |
' Purpose: �I�u�W�F�N�g���������o�b�N�A�b�v�A���X�g�A�������B |
| 333 |
' Remarks: �f�[�^�x�[�X�������x�������������g�����U�N�V�������[���o�b�N���������g�p���������B |
| 334 |
'=============================================================================== |
| 335 |
Private Sub backup(ByVal toBackup As Boolean) |
| 336 |
End Sub |
| 337 |
|
| 338 |
' ============================================================================== |