Hi All,
I've setup the XOMBuilder into a Module so I can reuse it's functionaility without having to use the same code throughout my project (reusable code). However, when I try and process and XML string returned by the HTTP post I get the following error
The sub is there. Is the XOM lib able to work in a module or does it have to be within an Activity module?
Here is the code I'm using;
Would appreciate any help.
Thanks
I've setup the XOMBuilder into a Module so I can reuse it's functionaility without having to use the same code throughout my project (reusable code). However, when I try and process and XML string returned by the HTTP post I get the following error
B4X:
"java.lang.Exception: Sub xombuilder1_builddone was not found."
Here is the code I'm using;
B4X:
Sub GetAttFromXML(strXML As String)
Dim XOMBuilder1 As XOMBuilder
XOMBuilder1.Initialize("XOMBuilder1")
XOMBuilder1.BuildFromString(strXML, "", Null)
End Sub
Sub XOMBuilder1_BuildDone(XOMDocument1 As XOMDocument, Tag As Object)
If XOMDocument1.IsInitialized Then
Dim RootElement As XOMElement
RootElement = XOMDocument1.RootElement
Log( RootElement.GetAttributeValueByName("IsAuthorisedDeviceResult"))
If RootElement.GetAttributeValueByName("IsAuthorisedDeviceResult") <> - 99999 Then
Main.DeviceAuthorised = True
End If
End If
End Sub
Would appreciate any help.
Thanks