Re: SimpleXML addChild() namespace problem
| From: | Nathan Nobbe | Date: | Fri, 18 Jan 2008 17:22:04 +0000 |
| Subject: | Re: SimpleXML addChild() namespace problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267577@lists.php.net to get a copy of this message | ||
On Jan 18, 2008 12:04 PM, Carole E. Mah <carole.mah@gmail.com> wrote:
> I did exactly this, and still got:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <rss
> xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
> version="
> 2.0">
> <channel>
> <!-- snipping, some elements omitted ... -->
> <item>
> <title>My Title</title>
> <link>My Link</link>
> <description>My Description</description>
> <itunes:author xmlns:itunes="itunes">My
> Author</itunes:author>
> <itunes:subtitle xmlns:itunes="itunes">My
> Subtitle</itunes:subtitle>
> <!-- snipping, more elements omitted ... -->
> </item>
> </channel>
> </rss>
>
are you trying to read an existing document into a SimpleXMLElement, or are
you trying
to create a SimpleXMLElement instance and generate a document from that?
my impression was you were trying to do the later; please clarify and if you
are trying to
do the later, post the code you are using to create the SimpleXMLElement
instance and
generate the output youve posted.
-nathan