From 66ebe08e09c07209ddce40c1f9de9c1d4113de2c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 29 Apr 2010 07:37:29 +0000 Subject: [PATCH] 2010-04-29 09:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/xhb/tests/xml1.prg ! Formatting. % Replaced HHasKey() with '$' operator. --- harbour/ChangeLog | 5 +++++ harbour/contrib/xhb/tests/xml1.prg | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 349b4df8d7..97da1d6596 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-04-29 09:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/xhb/tests/xml1.prg + ! Formatting. + % Replaced HHasKey() with '$' operator. + 2010-04-29 09:18 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/common/hbver.c + Now able to distinguish between XP x64 and Server 2003. diff --git a/harbour/contrib/xhb/tests/xml1.prg b/harbour/contrib/xhb/tests/xml1.prg index 76a1825433..ca36eb24ea 100644 --- a/harbour/contrib/xhb/tests/xml1.prg +++ b/harbour/contrib/xhb/tests/xml1.prg @@ -19,7 +19,7 @@ PROCEDURE Main() oDoc := TXmlDocument():New( cString, HBXML_STYLE_NOESCAPE ) IF oDoc:nError != HBXML_ERROR_NONE - WAIT "xml file parsing error " + str(oDoc:nError) + WAIT "xml file parsing error " + Str( oDoc:nError ) RETURN ENDIF @@ -31,21 +31,21 @@ PROCEDURE Main() DO WHILE .T. - IF HHasKey( oBook:aAttributes, "id" ) + IF "id" $ oBook:aAttributes ? "book ID : " + oBook:aAttributes[ "id" ] ELSE ? "no attribute book ID" ENDIF - cNote:="" - cDiscount:="" - oIterator:=TXmlIterator():New( oBook ) + cNote := "" + cDiscount := "" + oIterator := TXmlIterator():New( oBook ) DO WHILE .T. oCurrent := oIterator:Next() IF oCurrent == NIL ? "end branch" - WAIT "values : "+cNote+" "+cDiscount + WAIT "values : " + cNote + " " + cDiscount EXIT ELSE ? "current tag : " + oCurrent:cName