You are here: Re: Reading XML file - chars being dropped « PHP Programming Language « IT news, forums, messages
Re: Reading XML file - chars being dropped

Posted by Dikkie Dik on 11/17/07 20:32

> If I try to echo the $data variable right at the place where the
> assignment to $ef['title'] occurs, $data contains the entire string
> ("Attaché to the White House"). Seems like the assignment operator is
> truncating the string.
>
> I figure this is because of PHP's limitations with 256 chars, but does
> anyone have a workaround?

What limitations? Strings can be "absurd" long.

If you think the assignment is the problem, have you tried what
$ef['title'] is directly before and after the assignment?

>
> <php code>
> function ef_characterData($parser, $data) {
> global $curTag, $ef;
> $titleKey = "^ROOT^TITLE";
> if ($curTag == $titleKey) $ef['title'] = $data;
> }
> </php code>
>
> <xml file>
> <Root>
> <title>The local Attaché to the white house</title>
> </Root>
> </xml file>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация