tml
|
codepad
|
|
tml
|
Saved pastes by tml:
<?php
$xml = <<<XML
<?xml version="1.0"?>
<us:ItemMaster xmlns:us="foo" xmlns:oa="bar">
|
view (100 lines, 6 lines of output) |
<?php # parse dl/dt/dd into an array
$xml = <<<XML
<dl>
<dt>Cascading Style Sheets</dt>
|
view (40 lines, 12 lines of output) |
<?php # sort callback, push NULLs to end
function sorter($a, $b) {
if ($a === NULL) {
if ($b === NULL) return 0;
|
view (19 lines, 24 lines of output) |
<?php # Create a new RSS item, iteratively replaceChild to make it the firstChild
$xml =<<< XML
<?xml version="1.0"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" >
<channel>
|
view (43 lines, 15 lines of output) |