, 07 2006 . 17:39
+
, , XML-. .
v7plus.dll 77, XML-, , XMLDOM.
mista.ru XML, , , , XML DOM 1, VBA Delphy PHP. :)
, XML .
Windows XMLDOM.
1 () XML ( XML), . , . - XMLDOM.
, 80 COM-, - , .
1 , , 3 , .
:
(xmlDoc, , =0)
();
=.childNodes.length;
=1
();
= .childNodes.item(-1);
.nodeType<>1
;
;
="";
1=1
=+" ";
;
="";
2=1 .attributes.length
=.attributes.item(2-1);
=+?(="","",";")+.nodename+"="+.value;
;
="";
.childNodes.length=1 and .childNodes.item(0).nodetype=3
=.childNodes.item(0).text;
;
=+.tagName+?(="","","("++")" ) + ":" +;
();
(xmlDoc, , +1);
;
()
// .
xmlDoc = COM("Microsoft.XMLDOM");
xmlDoc.Load();
RootNode = xmlDoc.DocumentElement;
(xmlDoc, RootNode, 0);
//MsgBox currNode.xml
xmlDoc=0;
:
title:Very Useful Journal
contacts:
address:sdsds
tel:8-3232-121212
tel:8-3232-121212
email:j@j.ru
url:
www.j.ru
issues-list:
issue:
title(index=2):XML today
date(index=2):12.09.98
about(index=2):XML
home-url(index=2):
www.j.ru/issues/
articles(index=2):
article:
title(ID=3):Issue overview
url(ID=3):/article1
hotkeys(ID=3):
hotkey:language
hotkey:marckup
hotkey:hypertext
article-finished(ID=3):
article:
title:Latest reviews
url:/article2
author:
hotkeys:
hotkey:
article:
title(ID=4):
url(ID=4):
hotkeys(ID=4):
authors-list:
author:
firstname(ID=1):Ivan
lastname(ID=1):Petrov
email(ID=1):vanya@r.ru
author:
firstname(ID=3):Petr
lastname(ID=3):Ivanov
email(ID=3):petr@r.ru
author:
firstname(ID=4):Sidor
lastname(ID=4):Sidorov
email(ID=4):sidor@r.ru