DOMDocument->save()
    (no version information, might be only in CVS)
DOMDocument->save() -- 
    内部の XML ツリーをファイルに出力する
  
説明
class 
DOMDocument { 
mixed 
save ( string filename [, integer options] )
}
   DOM 表現から XML ドキュメントを作成します。この関数は、通常は以下の例のように
   DOM ドキュメントを新しく作成した後にコールされます。
  
パラメータ
   
- filename
 
       保存された XML ドキュメントへのパス。
      
- options
 
       追加のオプション。現在は LIBXML_NOEMPTYTAG のみが
       サポートされています。
      
 
  返り値
   書き込んだバイト数、あるいはエラーが発生した場合は FALSE を返します。
  
例
   
例 1. DOM ツリーをファイルに保存する 
<?php
  $doc = new DOMDocument('1.0'); // 出力はきれいに整形したいですね。 $doc->formatOutput = true;
  $root = $doc->createElement('book'); $root = $doc->appendChild($root);
  $title = $doc->createElement('title'); $title = $root->appendChild($title);
  $text = $doc->createTextNode('This is the title'); $text = $title->appendChild($text);
  echo 'Wrote: ' . $doc->save("/tmp/test.xml") . ' bytes'; // Wrote: 72 bytes
  ?>
 |  
  |