AtomParser::map_xmlns( indexish $p, array $n ): string

In this article

Map XML namespace to string.

Parameters

$pindexishrequired
XML Namespace element index
$narrayrequired
Two-element array pair. [ 0 => {namespace}, 1 => {url} ]

Return

string 'xmlns="{url}"' or 'xmlns:{namespace}="{url}"'

Source

public static function map_xmlns($p, $n) {
	$xd = "xmlns";
	if( 0 < strlen($n[0]) ) {
		$xd .= ":{$n[0]}";
	}
	return "{$xd}=\"{$n[1]}\"";
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.