情報を XML として送信する PDF フォームがあります。フォーマットなどをテストするために、PHP ファイルの xml データをエコーアウトしたい。
$xml = file_get_contents('php://input');
$reader = new XMLReader();
$reader->XML($xml);
while ($reader->read()) {
foreach ($reader as $name => $value) {
echo "$name: $value\n";
}
}
// this line will echo out the values of the xml one after the
// other without spaces. I am looking for name: value.
echo "<br>$xml<br>";