This is my simple test using XMLDOM:
I have instaled Windows Server 2003 SP2 e .NET 1.0 e 2.0 and SOAP Toolkit 3.0.
- Code: Select all Expand view
#include "FiveWin.ch"
Function main()
local RespText, objXMLHTTP
oXMLDoc := TOLEAUTO():New("Microsoft.XMLDOM")
// Allow the document to complete loading
oXMLDoc:async := .f.
lSuccess := oXMLDoc:load( "books.xml" )
x := oXMLDoc:getElementsByTagName( "book" )
y := oXMLDoc:getElementsByTagName( "author" )
for i = 1 to x:length
agendamentoDetails := x
? agendamentoDetails:Item(i-1):NodeName + " = " + agendamentoDetails:Item(i-1):Text
? y:Item(i-1):Text
next
return nil
A XML table:
- Code: Select all Expand view
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book category="COOKING">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="CHILDREN">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="WEB">
<title lang="en">XQuery Kick Start</title>
<author>James McGovern</author>
<year>2003</year>
<price>49.99</price>
</book>
<book category="WEB">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
<book>
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
PS: Not tested in other Windows versions.