XML:
Code:
<?xml version="1.0" encoding="utf-8"?>
<shows>
<month ym="201411">
<show>
<dt>26</dt>
<wd>Wednesday</wd>
<?xml version="1.0" encoding="utf-8"?>
<shows>
<month ym="201411">
<show>
<dt>26</dt>
<wd>Wednesday</wd>
function audioEmbed(targetDiv,fileName)
<?php
$dom = new DOMDocument();
$dom->load("xml.xml");
$menu = new DOMXPath($dom);
$entries = $menu->query("//menu/entry");
print_r($entries);
?>
<?php
$dom = new DOMDocument();
$dom->load("xml.xml");
$menu = new DOMXPath($dom);
foreach($menu->query("//menu/entry") as $entry) {
print "Action is: " . $menu->query('.//action',$entry)->item(0)->nodeValue;
print "Title is: " . $menu->query('.//title',$entry)->item(0)->nodeValue;
<?xml version="1.0" encoding="UTF-8"?> <menu> <entry> <action> Test </action> <title> Test Menu Item 1 </title> </entry> <entry> <action> Test 2 </action> <title> Test Menu Item 2 </title>
<html> <head> <script type="text/javascript">
<html>
<head>
<script type="text/javascript">
function loadXMLDoc(dname) {
var xmlDoc;
if (window.XMLHttpRequest)
function getSound(url:String) {
sound.stop();
delete sound;
sound = new Sound();
sound.loadSound(url,
<?php
// Get information from file //
$IPs = "IPs.txt";
$fp = fopen($IPs, "r");
$ipList = fread($fp, filesize($IPs));
fclose($fp);
// Explode line breaks //
$bannedIPs = explode("\n", $ipList);
// Get new IP //
$ipNew = $REMOTE_ADDR;
// Check to see
<?php // Get information from
<script type="text/javascript">
xmlDoc = loadXMLDoc("stations.xml");
x = xmlDoc.getElementsByTagName('city');
for (i=0;i<x.length;i++) {
if (x[i].parentNode.parentNode.getAttribute('id2')=='TX') {
document.write(x[i].childNodes[0].nodeValue + "<br />");
}
}
</script>
<?xml version="1.0"
x=xmlDoc.getElementsByTagName('title');
for (i=0;i<x.length;i++) {
document.write(x[i].childNodes[0].nodeValue);
document.write("<br />");
}
Leave a comment: