Re: [PHP] Bug in SimpleXML?
- Date: Mon, 2 Jun 2008 16:27:45 -0600
- From: "Nathan Nobbe" <quickshiftin@xxxxxxxxx>
- Subject: Re: [PHP] Bug in SimpleXML?
On Mon, Jun 2, 2008 at 3:12 PM, Kyle Browning <nomspes@xxxxxxxxx> wrote:
> I was working on a project for XML Parsing. I came across instances where
> my
> elements were completely missing.
>
> After further Digging into the issue, I found out, that when placing tags
> inside of an element with text, SimpleXML (and dom Document) ignore the
> added tags, and the text within.
>
thats a known limitation. i have written a workaround in some code for a
personal project, but it cant be great for performance. anyway, another
option is to use DOM.
> -----------output-----------------
> SimpleXMLElement Object
> (
> [Article] => SimpleXMLElement Object
> (
> [Title] => Is Your Face on Facebook?
> [Subtitle] => Employ simple strategies to market your ?profile?
> using online social networking.
> [Body] => Temp Testing Example of SimpleXML Bug.
> [Folio] => Trying to just show Examples
> )
>
> )
are you using print_r() or var_dump() to generate this output? fyi, those
are explicitly not supported by simplexml.
-nathan