XMLWriter::flush
XMLWriter::flush — 現在のバッファをフラッシュする
説明
オブジェクト指向型class XMLWriter {
mixed flush ( [bool empty] )
} 手続き型
mixed xmlwriter_flush ( resource xmlwriter [, bool empty] )
現在のバッファをフラッシュします。
パラメータ
- xmlwriter
-
手続き型のコールでのみ使用します。
変更される XMLWriter resource です。
このリソースは、xmlwriter_open_uri()
あるいは xmlwriter_open_memory()
のコールによって取得したものです。
- empty
-
バッファを空にするかどうか。デフォルトは TRUE です。
返り値
ライターをメモリにオープンした場合は、この関数は出来上がった XML バッファを返します。 そうではなく URI を使用している場合は、この関数はバッファを書き込み、 書き込んだバイト数を返します。XmlWriter.Flush メソッド
アセンブリ: System.Xml (system.xml.dll 内)



Imports System Imports System.IO Imports System.Xml Public Class Sample Public Shared Sub Main() ' Create an XmlWriter to write XML fragments. Dim settings As XmlWriterSettings = new XmlWriterSettings() settings.ConformanceLevel = ConformanceLevel.Fragment settings.Indent = true Dim writer As XmlWriter = XmlWriter.Create(Console.Out, settings) ' Write an XML fragment. writer.WriteStartElement("book") writer.WriteElementString("title", "Pride And Prejudice") writer.WriteEndElement() writer.Flush() ' Write another XML fragment. writer.WriteStartElement("cd") writer.WriteElementString("title", "Americana") writer.WriteEndElement() writer.Flush() 'Close the writer. writer.Close() End Sub End Class
using System; using System.IO; using System.Xml; public class Sample { public static void Main() { // Create an XmlWriter to write XML fragments. XmlWriterSettings settings = new XmlWriterSettings(); settings.ConformanceLevel = ConformanceLevel.Fragment; settings.Indent = true; XmlWriter writer = XmlWriter.Create(Console.Out, settings); // Write an XML fragment. writer.WriteStartElement("book"); writer.WriteElementString("title", "Pride And Prejudice"); writer.WriteEndElement(); writer.Flush(); // Write another XML fragment. writer.WriteStartElement("cd"); writer.WriteElementString("title", "Americana"); writer.WriteEndElement(); writer.Flush(); // Close the writer. writer.Close(); } }
#using <System.Xml.dll> using namespace System; using namespace System::IO; using namespace System::Xml; void main() { // Create an XmlWriter to write XML fragments. XmlWriterSettings^ settings = gcnew XmlWriterSettings; settings->ConformanceLevel = ConformanceLevel::Fragment; settings->Indent = true; XmlWriter^ writer = XmlWriter::Create( Console::Out, settings ); // Write an XML fragment. writer->WriteStartElement( L"book" ); writer->WriteElementString( L"title", L"Pride And Prejudice" ); writer->WriteEndElement(); writer->Flush(); // Write another XML fragment. writer->WriteStartElement( L"cd" ); writer->WriteElementString( L"title", L"Americana" ); writer->WriteEndElement(); writer->Flush(); // Close the writer. writer->Close(); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- XMLWriter::flushのページへのリンク