Помогите новичку XML'я... :)
Релиб
Форумы       Участники    Календарь    Кто он-лайн?
Добро пожаловать, гость ( Вход | Регистрация )
        



Помогите новичку XML'я... :) Expand / Collapse
Автор
Сообщение
11.02.2002 16:46
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

участник
Last Login: 11.06.2003 13:19
Сообщ.: 70, Visits: 771
Есть xml файл. Хочe его проанализировать и выдать в html. В чём ошибка? Жалутся на 14 строку...

<%
Set myxml=Server.CreateObject("msxml")
myxml.url = "http://www.rcb.ru/trades.xml"
Set root=myxml.root
%>
<body bgcolor="white">
<p><center><hr width=80%>XML sample page
<hr width=80%></center><p>
<%parse root%>
</body>
<%function parse(root)
i=0
if root.type=0 Then
Response.Write ("<UL>Current tag is " & root.tagName & "parent is " & root.parent)
elseif root.type = 1 Then
Response.Write ("<LI>It is a text of " & root.parent.tagName & "element: <i>" & root.text & "</i></LI>")
else
Response.Write ("<br><br>Error")
End if
if root.children <> null Then
Response.Write("It consist of " & root.children.length & " elements:")
for i=0 to root.children.length
parse(root.children.item(i))
Next
else
Response.Write("</UL>")
End If
End Function%>
Сообщ. #741378
12.02.2002 20:32
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

участник
Last Login: 12.02.2004 16:41
Сообщ.: 1 756, Visits: 19 372
попробуй Server.CreateObject("Msxml2.DOMDocument")
Сообщ. #741522
« пред. тема | след. тема »


Эту тему читают Expand / Collapse
Посетители: 0 (0 гостей, 0 участников, 0 скрыт.участников)
Сейчас нет участников, просматривающих тему.
Модераторы: Alexey, boombastik, bazile, pl

Время GMT +3:00, Сейчас 3:27