Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> problem z czytaniem xml z ajaxa
michalr
post 5.04.2006, 07:24:39
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 27.03.2006

Ostrzeżenie: (0%)
-----


mam taka xml:
<main>
<auto name="a1">
<audi name="b1" name2="cc"></audi>
</auto>
<auto name="a2">
<audi name="b2"></audi>
</auto>
</main>
i ro bie w JS tak

var x = xmlObj.getElementsByTagName('auto') ;
x[0].childNodes[0].getAttribute("name"); // zwraca b1

ale

x[0].childNodes[0].getAttribute("name2"); //. zwraca null

wie ktos dlaczego nie cc tylko null ?

Ten post edytował michalr 5.04.2006, 08:29:11
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 28.04.2024 - 09:55