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