No that one also returns nil it seems.
Thanks
Björn
On 23.3.2006, at 15:30, Jason Essington wrote:
I have noticed a couple of "anomalies" with the XQL functionality
in REALbasic, but I have generally been able to make it work by
tweaking the query.
If you try:
nodelist = element.Xql("//"+name)
does it return anything?
-jason
On Mar 23, 2006, at 7:39 AM, Björn Eiríksson wrote:
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>
_______________________________________________
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>
_______________________________________________
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>