Re: xml parsing

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

 



On Mon, 2007-03-12 at 01:38 +0100, Marije van Deventer wrote:
> I have been trying to parse this xml, and want to use it with
> childnodes <Label> and <Tekst>, but sofar due to the <li> and
> <p> and <image> elements no luck. How can i do this in a simple
> way ???

You're having trouble because the person who set the content of <Tekst>
didn't have a clue and so didn't mark up special entities. As such, the
XML has now taken on a mixed structure of XML and HTML.

You might have success performing the following before trying to parse:

<?php

    $xml = str_replace( '<Tekst>', '<Tekst><![CDATA[', $xml );
    $xml = str_replace( '</Tekst>', ']]></Tekst>', $xml );

?>

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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