Hello
I just wanted to share this with people since it might help others
who are porting from REALbasic 5.5 to 2005/2006. Ever since 2005 came
then I have been struggling to port 5.5 apps to 2005/2006 with really
slow progress as its sometimes difficult to pinpoint what goes wrong
in large apps.
Today I found that the following fails on REALbasic 2006r1:
Function Node(extends element as XmlNode,name as String) As XmlNode
dim nodelist as xmlnodeList
nodelist = element.Xql(name)
if nodelist.length > 0 then
return nodelist.item(0)
end if
return nil
exception e as xmlException
End Function
By fails then I mean it just does not return the node that it is
supposed to do.
The code above does the same as this code bellow. Though the fact
that the code above is failing shows that Xql broke or at least
changed in REALbasic 2006.
Function Node(extends element as XmlNode,name as String) As XmlNode
Dim i as Integer
for i = 0 to element.ChildCount-1
if element.Child(i).Name = name then
return element.Child(i)
end if
next
return nil
End Function
--
______________________________________________________________________
Björn Eiríksson [EMAIL PROTECTED]
Einhugur Software
http://www.einhugur.com/
______________________________________________________________________
Einhugur Software has sold its products in 52 countries world wide.
______________________________________________________________________
For support: [EMAIL PROTECTED]
To post on the maillist: [EMAIL PROTECTED]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>