This is problematic code, even though it works, because it
auto-generates an unnecessary xmlns: attribute:

$item->addChild('itunes:subtitle', $mySubTitle,"itunes");

It generates the following XML:

<itunes:subtitle xmlns:itunes="itunes">Musical Mockery</itunes:subtitle>

When really all we want is this:

<itunes:subtitle>Musical Mockery</itunes:subtitle>

Furthermore, dumping it into a DomDocument and attempting to use
removeAttributeNS() to remove the spurious attribute removes the
entire kit and kaboodle, leaving only:

<subtitle>Musical Mockery</subtitle>

How can one get the desired result, short of using a regexp? (I have
done this, and it works, but is a silly hack because it doesn't use
XML parsing to address an XML problem).

Thanks,

Carole

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to