Re: Bug in SimpleXML?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux