Re: Bug in SimpleXML?
| From: | Nathan Nobbe | Date: | Mon, 02 Jun 2008 22:27:45 +0000 |
| Subject: | Re: Bug in SimpleXML? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-274940@lists.php.net to get a copy of this message | ||
On Mon, Jun 2, 2008 at 3:12 PM, Kyle Browning <nomspes@gmail.com> 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