Code: Select all
Global base
base = {}
;; base:GetXmlInteger(data,key)
; You should call this recursively in a While ... data = ReadLine(1)...Wend structure; ex. call line$ = p_getXmlInteeger(data,"Track ID")
Function base:GetXmlInteger(data,key)
Local result = 0
If FindStr(data,"<key>") > -1
If FindStr(data,key) > -1
data = ReadLine(1)
result = MidStr(data,FindStr(data,"<integer>")+StrLen("<integer>"),StrLen(data))
result = UnleftStr(result,StrLen("</integer>"))
EndIf
EndIf
Return(result)
EndFunction