user:skripty:com
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user:skripty:com [2010/08/17 14:24] – mikrom | user:skripty:com [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 10: | Line 10: | ||
procedure ReadXML; | procedure ReadXML; | ||
var | var | ||
- | Document: | + | Document: |
- | NodeList: | + | NodeList: |
Root: variant; | Root: variant; | ||
s: string; | s: string; | ||
Line 19: | Line 19: | ||
Document := CreateOleObject(' | Document := CreateOleObject(' | ||
try | try | ||
- | Document.async := False; | + | Document.Async := false; |
- | Document.validateOnParse | + | Document.ValidateOnParse |
- | Document.resolveExternals | + | Document.ResolveExternals |
- | Document.preserveWhiteSpace | + | Document.PreserveWhiteSpace |
- | Document.load(' | + | Document.Load(' |
- | if Document.parseError.errorCode | + | if Document.ParseError.ErrorCode |
begin | begin | ||
- | ShowMessage(' | + | ShowMessage(' |
- | + ', character ' + inttostr(Document.parseError.linePos) + CRLF | + | + ', character ' + inttostr(Document.ParseError.LinePos) + CRLF |
- | + Document.parseError.srcText); | + | + Document.ParseError.SrcText); |
exit; | exit; | ||
end; | end; | ||
Root := Document.DocumentElement; | Root := Document.DocumentElement; | ||
NodeList := Root.SelectNodes('/ | NodeList := Root.SelectNodes('/ | ||
- | | + | |
s := ''; | s := ''; | ||
for n := 0 to NodeList.Length - 1 do | for n := 0 to NodeList.Length - 1 do | ||
begin | begin | ||
- | if n >= 20 then break; //just first 20 records... | + | if n >= 20 then break; //just first 20 records... |
- | s := S + CRLF + NodeList.item[n].text; | + | s := S + CRLF + NodeList.Item[n].Text; |
end; | end; | ||
ShowMessage(s); | ShowMessage(s); | ||
Line 45: | Line 45: | ||
end; | end; | ||
except | except | ||
- | | + | |
end; | end; | ||
end; | end; | ||
</ | </ |
user/skripty/com.1282047899.txt.gz · Last modified: 2010/08/17 00:00 (external edit)