source: trunk/Include/Classes/System/Xml/XmlDocument.ab@ 443

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

タグ属性に対応。

File size: 1.8 KB
Line 
1Namespace System
2Namespace Xml
3
4/*!
5@brief XMLドキュメントを表す
6*/
7Class XmlDocument
8 Inherits XmlNode
9
10 Sub VerifyLocalName( name As String )
11 If Object.ReferenceEquals( name, Nothing ) Then
12 ' Throw System.ArgumentException()
13 ElseIf name.Length = 0 Then
14 ' Throw System.ArgumentException()
15 End If
16 End Sub
17
18Public
19
20 /*!
21 @brief コンストラクタ
22 */
23 Sub XmlDocument()
24 XmlNode( XmlNodeType.Document, "", "#document", "", Nothing )
25 End Sub
26
27 /*!
28 @brief コンストラクタ
29 */
30 'Sub XmlDocument( xmlImplementation As XmlImplementation )
31 'End Sub
32
33 /*!
34 @brief コンストラクタ
35 */
36 'Sub XmlDocument( xmlNameTable As XmlNameTable )
37 'End Sub
38
39 /*!
40 @brief 指定した値を使用して、XmlDeclaration ノードを作成します。
41 @param version XMLのバージョン番号。
42 encoding 文字コード。(例:"shift-jis", "UTF-8", "EUC-JP")
43 standalone 外部DTDの参照が必要かどうか。"yes" or "no"
44 */
45 Function CreateXmlDeclaration( version As String, encoding As String, standalone As String ) As XmlDeclaration
46 Return New XmlDeclaration( version ,encoding, standalone, This )
47 End Function
48
49 /*!
50 @brief 指定した名前を使用して属性を作成します。
51 @param name 属性名
52 */
53 Function CreateAttribute( name As String) As XmlAttribute
54 VerifyLocalName( name )
55
56 Return New XmlAttribute( "", name, "", This )
57 End Function
58
59 /*!
60 @brief 指定した名前を使用して要素を作成します。
61 @param name 要素名。
62 */
63 Function CreateElement( name As String ) As XmlElement
64 VerifyLocalName( name )
65
66 Return New XmlElement( "", name, "", This )
67 End Function
68
69 /*!
70 @brief このノードとそのすべての子ノードを表すマークアップを取得します。
71 @return このノードとそのすべての子ノードを格納しているマークアップ。
72 */
73 Override Function OuterXml() As String
74 Return This.InnerXml
75 End Function
76
77End Class
78
79
80End Namespace
81End Namespace
Note: See TracBrowser for help on using the repository browser.