Strona 1 z 1

Problem z xml - linki

: wt mar 20, 2007 10:41 am
autor: Ivan
Witam.
Mam poważny problem, bo chcę skończyć projekt i męczę się z jedną rzeczą, a mianowicie, jak w pliku xml zrobić, żeby we flashu mi pokazywał linki jak w htmlu.

To jest kod AS:
function process(var_xml)
{
biografie_angel = var_xml.firstChild.childNodes[0].firstChild.nodeValue;
biografie_maxx = var_xml.firstChild.childNodes[1].firstChild.nodeValue;
biografie_gino = var_xml.firstChild.childNodes[2].firstChild.nodeValue;
biografie_elena = var_xml.firstChild.childNodes[3].firstChild.nodeValue;
play ();
} // End of the function
stop ();
bio_xml = new XML();
bio_xml.ignoreWhite = true;
bio_xml.onLoad = function (success)
{
if (success)
{
process(bio_xml);
} // end if
};
bio_xml.load("music/info.xml");
A tutaj mam kod z xml
[xml]
<biografie>
<angel>biografia</angel>
</biografie>[/xml]

Potrzebuje takie cos, że jak wpisze mu np w
<biografie>
<angel>Grałem w Radiu Jaworzno</angel>
</biografie>
to Radiu Jaworzno, będzie linkiem do innej strony.
Da się cos takiego wykonac z tym kodem, co mam?

Proszę o szybką pomoc.
Z góry thx

Re: Problem z xml - linki

: wt mar 20, 2007 11:37 am
autor: Marek_bf

Re: Problem z xml - linki

: wt mar 20, 2007 1:50 pm
autor: Ivan
no włąsnie nie wiem czemu ale zadnych tagów mi nie czyta z html i w tym cały problem.

Jak mu daje:
[xml]<biografie>
<angel><b><i>test</i></b></angel>
</biografie> [/xml]
To mi pokazuje null :|

Albo jak zrobić, żeby mi wyświetlało coś wedle:


[xml]<biografie>
<opis>tekst</opis>
<link>link</link>
</biografie>[/xml]

Re: Problem z xml - linki

: wt mar 20, 2007 3:17 pm
autor: Marek_bf
Spójrz na strukturę swojego XML. Nie czyta Tagów HTML myśli, że to są kolejne węzły XML. Pozmianiej w Tagach HTML < > na < >

Re: Problem z xml - linki

: wt mar 20, 2007 3:39 pm
autor: Ivan
Dzięki bardzo. DZIAŁA :D
Męczyłem się z tym 2 tygodnie, a tu o taki banał chodziło :)
Thx bardzo :)