source: trunk/ab5.0/ablib/src/Classes/System/Xml/XmlDeclaration.ab

Last change on this file was 456, checked in by dai, 16 years ago

タイプミスを修正

File size: 1.0 KB
Line 
1Namespace System
2Namespace Xml
3
4/*!
5@brief XML 宣言ノード <?xml version='1.0' ...?> を表します。
6*/
7Class XmlDeclaration
8 Inherits XmlLinkedNode
9
10 version As String
11 encoding As String
12 standalone As String
13
14Public
15 Sub XmlDeclaration( version As String, encoding As String, standalone As String, doc As XmlDocument )
16 XmlLinkedNode( XmlNodeType.XmlDeclaration, "", "xml", "", doc )
17 This.version = version
18 This.encoding = encoding
19 This.standalone = standalone
20 End Sub
21
22Protected
23 Override Function InnerXmlSupportedIndent( isIndent = False As Boolean, indent = 0 As Long ) As String
24 Return Ex"version=\q" + This.version + Ex"\q encoding=\q" + This.encoding + Ex"\q"
25 End Function
26
27 Override Function OwnerXmlSupportedIndent( isIndent = False As Boolean, indent = 0 As Long ) As String
28 Dim crlfStr = ""
29 If isIndent Then
30 ' インデントをサポートする場合
31 crlfStr = Ex"\r\n"
32 End If
33 Return "<?xml " + InnerXml + "?>" + crlfStr
34 End Function
35End Class
36
37
38End Namespace
39End Namespace
Note: See TracBrowser for help on using the repository browser.