Re: [PHP-XML-DEV] CDATA
[email protected] (Kevin Waterson)
| Newsgroups | php.xml.dev |
|---|---|
| Organization | Oceania |
| Message-ID | <[email protected]> |
This one time, at band camp, Kevin Waterson <[email protected]> wrote: > This one time, at band camp, Kevin Waterson <[email protected]> wrote: > > > How do we now go about adding CDATA? > > > > eg > > > > $cdata= '<my_text><![CDATA[ some text here ]]></my_text>'; > > $dom = new domDocument(); > > > > $dom->cdataSection($cdata); > > I found in the source domCDATASection() but have had no luck with > this either. ahh, needs to be used with appendChild() $new=$this->root->appendChild(new domCDATASection($cdata)); Kevin -- ______ (_____ \ _____) ) ____ ____ ____ ____ | ____/ / _ ) / _ | / ___) / _ ) | | ( (/ / ( ( | |( (___ ( (/ / |_| \____) \_||_| \____) \____) Kevin Waterson Port Macquarie, Australia