I am new to Corona and just started to try out. I try to parse xml from a string got frpm webservice and hit into below problem. I am using XML.Lua and added a new loadXMLString(xmlString) function (as shown below) into it, in order to parse my xml string. Can someone help on this. Thank you.
function XmlParser:loadXMLString(xmlString)
return self:ParseXmlText(xmlString),nil;
end
Runtime error
c:\users\admin\docume~1\corona~1\sandbox\15\main.lua:76: attempt to index field ‘?’ (a nil value)
stack traceback:
[C]: ?
c:\users\admin\docume~1\corona~1\sandbox\15\main.lua:76: in function ‘parseXML’
c:\users\admin\docume~1\corona~1\sandbox\15\main.lua:96: in function <c:\users\admin\docume~1\corona~1\sandbox\15\main.lua:89>Runtime error: c:\users\admin\docume~1\corona~1\sandbox\15\main.lua:76: attemptto index field ‘?’ (a nil value)
stack traceback:
[C]: ?
c:\users\admin\docume~1\corona~1\sandbox\15\main.lua:76: in function ‘parseXML’
c:\users\admin\docume~1\corona~1\sandbox\15\main.lua:96: in function <c:\users\admin\docume~1\corona~1\sandbox\15\main.lua:89>
XML String
<?xml version=“1.0” encoding=“utf-8”?>
<soap:Envelope xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>
<soap:Body>
<bsResponse xmlns=“http://www.xxx.com/”>
<bsResult>
<bs xmlns="">
<ob>
<c1>C1</c1>
<c2>C2</c2>
<c3>C3</c3>
<c4>C4</c4>
<c5>C5</c5>
</ob>
<ob>
<c1>C1</c1>
<c2>C2</c2>
<c3>C3</c3>
<c4>C4</c4>
<c5>C5</c5>
</ob>
</bsResult>
</bsResponse>
</soap:Body>
</soap:Envelope>