Nama : Singgih Herlambang
Nim : 09.01.53.0090
Jawab :
1. Tampilkan nomor undang-undang sisdiknas :
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<title>Document XML</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>
<head>
<title>Document XML</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>
<body>
<?php
$doc = new DOMDocument();
$doc->load( ‘sisdiknas.xml’ );
$xpath = new DOMXPath($doc);
$arts = $xpath->query(“/undangundang/nomor”);
<?php
$doc = new DOMDocument();
$doc->load( ‘sisdiknas.xml’ );
$xpath = new DOMXPath($doc);
$arts = $xpath->query(“/undangundang/nomor”);
foreach ($arts as $art)
{
echo $art->nodeValue.”";
}
?>
</body>
</html>
{
echo $art->nodeValue.”";
}
?>
</body>
</html>





