Changeset 452 for trunk/Include/Classes/System/Xml
- Timestamp:
- Mar 3, 2008, 10:15:06 PM (17 years ago)
- Location:
- trunk/Include/Classes/System/Xml
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Xml/XmlDocument.ab
r451 r452 94 94 95 95 /*! 96 @brief 指定したストリームからXML文書を読み込む。 97 @param stream 読み込み先のストリーム。 98 */ 99 Virtual Sub Load( inStream As System.IO.Stream ) 100 Dim length = inStream.Length As DWord 101 Dim xmlBuffer = calloc( length + 1 ) As *StrChar 102 inStream.Read( xmlBuffer As *Byte, 0, length ) 103 Dim xmlString = New String( xmlBuffer ) 104 free( xmlBuffer ) 105 106 This.RemoveAll() 107 ActiveBasic.Xml.Parser.Parse( xmlString, This ) 108 End Sub 109 110 /*! 111 @brief 指定したファイルからXML文書を読み込む。 112 @param ファイルパス。 113 */ 114 Virtual Sub Load( filename As String ) 115 Dim fileStream As System.IO.FileStream( filename, System.IO.FileMode.Open, System.IO.FileAccess.Read ) 116 Load( fileStream ) 117 End Sub 118 119 /*! 96 120 @brief 指定したストリームにXML文書を保存する。 97 121 @param stream 保存先のストリーム。 … … 107 131 */ 108 132 Virtual Sub Save( filename As String ) 109 Dim fileStream As System.IO.FileStream( filename, System.IO.FileMode.Create )133 Dim fileStream As System.IO.FileStream( filename, System.IO.FileMode.Create, System.IO.FileAccess.Write ) 110 134 Save( fileStream ) 111 135 End Sub 112 136 137 Private 138 Sub LoadXmlString( xmlString As String) 139 End Sub 113 140 End Class 114 141
Note:
See TracChangeset
for help on using the changeset viewer.