Re: xml parsing

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

 



I don't think that's valid XML, because you are mixing your content
with your XML tags in a way that will confuse the two...

If you can FIX the XML by using the CDATA stuff, or htmlentities
encoding the HTML or something, that would be best.

If you are STUCK with this bogus XML, you could probably write your
own parser for something this simple/small in about an hour using
http://php.net/strtok and friends...


On Sun, March 11, 2007 7:38 pm, 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 ???
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Menu>
>  <Item>
>   <Label>Algemeen</Label>
>   <Tekst>aaaaaaaaaaaaaaaaaaaaaaaaaaaaa</Tekst>
>  </Item>
>  <Item>
>   <Label>1-Atmosfeer</Label>
>   <Tekst>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>   <li>aaaaaaaaaaaaaaaaaaaaa</li>
>   <li>bbbbbbbbbbbbbbbbbbbbbbbbbbb</li>
>   <li>ccccccccccccccc</li>
>   <li>dddddddddddddddddddddddddddddddddd</li>
>   <img src="Saf2.jpg" alt="News" width="240" height="232"/><br /><br
> /><br />qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq<br /><br /><br
> /></Tekst>
>  </Item>
>  <Item>
>   <Label>Betrouwbare drukcabine</Label>
>   <Tekst>ffffffffffffffffffffffffffffffff<img src="Saf3.jpg"
> alt="News" width="180" height="239"/><br /><br /><br /><br /><br
> /><br /><br /><br />gggggggggggggggggggggggggggggggggggggggggggg<br
> /><br /><br /><br /><br /><br /></Tekst>
>  </Item>
> </Menu>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
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