Changeset 443 for trunk/Include/Classes/System/Xml/XmlNode.ab
- Timestamp:
- Feb 28, 2008, 11:36:03 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Xml/XmlNode.ab
r442 r443 28 28 Class XmlNode 29 29 30 'attributes As XmlAttributeCollection30 attributes As XmlAttributeCollection 31 31 childNodes As XmlNodeList 32 32 prefix As String … … 49 49 This.value = Nothing 50 50 51 attributes = New XmlAttributeCollection 51 52 childNodes = New XmlNodeList() 52 53 End Sub … … 62 63 This.value = data 63 64 65 attributes = New XmlAttributeCollection 64 66 childNodes = Nothing 65 67 End Sub … … 73 75 @brief 名前またはインデックスによってアクセスできる属性のコレクションを表します。 74 76 */ 75 'Virtual Function Attributes() As XmlAttributeCollection76 'Return attributes77 'End Function77 Virtual Function Attributes() As XmlAttributeCollection 78 Return attributes 79 End Function 78 80 79 81 /*! … … 157 159 End Function 158 160 159 161 /*! 162 @brief このノードの値を取得します。 163 @return このノードの値。 164 */ 165 Virtual Function Value() As String 166 return value 167 End Function 168 169 /*! 170 @brief このノードの値を設定します。 171 @param value 値文字列。 172 */ 173 Virtual Sub Value( value As String ) 174 This.value = value 175 End Sub 160 176 161 177 … … 250 266 251 267 Protected 268 269 Function GetAttributesStr() As String 270 If attributes.Count = 0 Then 271 ' 属性が1つもない場合 272 Return "" 273 End If 274 275 Dim result = "" 276 Foreach attribute In attributes 277 result += " " + attribute.OuterXml 278 Next 279 Return result 280 End Function 281 252 282 Virtual Function InnerXmlSupportedIndent( isIndent = False As Boolean, indent = 0 As Long ) As String 253 283 Dim result = "" … … 275 305 276 306 If childNodes.Count = 0 Then 277 Return indentStr + "<" + localName + " />" + crlfStr307 Return indentStr + "<" + localName + This.GetAttributesStr() + " />" + crlfStr 278 308 End If 279 309 … … 281 311 282 312 ' 開始タグ 283 result += indentStr + "<" + localName + ">" + crlfStr313 result += indentStr + "<" + localName + This.GetAttributesStr() + ">" + crlfStr 284 314 285 315 ' 子ノードリスト
Note:
See TracChangeset
for help on using the changeset viewer.