PDA

Просмотр полной версии : Проблема с XML


Сергей Трофимов
23.04.2010, 15:52
Добрый день.

Очень надеюсь на Вашу помощь :) Проблема вот в чём есть сайт www.trafimaf.com (http://www.trafimaf.com)
В разделе "Featured Works" когда наводишь на какую либо работу - отображается текст описание этой работы. Так вот мне надо добавлять много текста около 8-14 строк. Но xml отображает этот текст с ПРОБЕЛАМИ между строк, пример:

Надо: Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a
type specimen book.

Отображается: Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an

unknown printer took a galley of type and scrambled it to make a type specimen book.

И вот сам код xml с которого всё берёт FLASH:

<gallery>
<items>
<item title="Branding" desc="Lorem Ipsum is simply dummy text of the printing
and typesetting industry. Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s, when an unknown printer took a galley of type and scrambled it
to make a type specimen book" url="images/01.jpg" />
</items>
</gallery>

Важно чтоб этот текст не залезал за экран, а его было удобно читать на просматриваемой плошади.

Большое СПАСИБО!:victory:

udaaff
23.04.2010, 17:20
Переносит таким образом потому что у вас CRLF (\r\n) используется в качестве перевода строки, а флеш и по CR перевод делает и по LF. Т.е. или удалите в самом текстовом файле все \r, например, или же во флеше удаляйте.

Лучше всего, поместите ваш текст в блок CDATA, и переносы расставьте в виде тегов <br/>, ignoreWhitespace, соответственно, в true.