PHP 8.5.0 Alpha 4 available for testing

Voting

: four plus three?
(Example: nine)

The Note You're Voting On

catalinenache78 at gmail dot com
14 years ago
To add new brand xml namespace use:

<?php
$element
->setAttributeNS(
'http://www.w3.org/2000/xmlns/', // xmlns namespace URI
'xmlns:mynamespace',
'example.com/mynamespace'
);
?>

'http://www.w3.org/2000/xmlns/' URI is important
to be able to add new namespaces !!!

Later you can use your namespace like:

<?php
$element
->setAttributeNS(
'example.com/mynamespace',
'mynamespace:something',
'value'
);
?>

<< Back to user notes page

To Top