Android Question Help with WebServices Dataset

jaraiza

Active Member
Licensed User
Longtime User
Hi,

I've been able to read regular kind of webservices (which returns one row and I only need to read columns), but now I need to read a DataSet and I haven't been able to do it.

I've found some questions about this issue but nobody seems to have an answer yet.

I made a WebService Dataset so I can show you the data I'm getting:

B4X:
<DataTable xmlns="http://tempuri.org/">
<xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="dtResult" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="dtResult">
<xs:complexType>
<xs:sequence>
<xs:element name="ID_EventoLugar" type="xs:long" minOccurs="0"/>
<xs:element name="ID_Evento" type="xs:int" minOccurs="0"/>
<xs:element name="LugarLetra" type="xs:string" minOccurs="0"/>
<xs:element name="LugarNum" type="xs:string" minOccurs="0"/>
<xs:element name="PosX" type="xs:int" minOccurs="0"/>
<xs:element name="PosY" type="xs:int" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<DocumentElement xmlns="">
<dtResult diffgr:id="dtResult1" msdata:rowOrder="0">
<ID_EventoLugar>1</ID_EventoLugar>
<ID_Evento>1</ID_Evento>
<LugarLetra>A</LugarLetra>
<LugarNum>1</LugarNum>
<PosX>226</PosX>
<PosY>723</PosY>
</dtResult>
<dtResult diffgr:id="dtResult2" msdata:rowOrder="1">
<ID_EventoLugar>2</ID_EventoLugar>
<ID_Evento>1</ID_Evento>
<LugarLetra>A</LugarLetra>
<LugarNum>2</LugarNum>
<PosX>248</PosX>
<PosY>718</PosY>
</dtResult>
<dtResult diffgr:id="dtResult3" msdata:rowOrder="2">
<ID_EventoLugar>3</ID_EventoLugar>
<ID_Evento>1</ID_Evento>
<LugarLetra>A</LugarLetra>
<LugarNum>3</LugarNum>
<PosX>273</PosX>
<PosY>713</PosY>
</dtResult>
<dtResult diffgr:id="dtResult4" msdata:rowOrder="3">
<ID_EventoLugar>4</ID_EventoLugar>
<ID_Evento>1</ID_Evento>
<LugarLetra>A</LugarLetra>
<LugarNum>4</LugarNum>
<PosX>296</PosX>
<PosY>709</PosY>
</dtResult>
<dtResult diffgr:id="dtResult5" msdata:rowOrder="4">
<ID_EventoLugar>5</ID_EventoLugar>
<ID_Evento>1</ID_Evento>
<LugarLetra>A</LugarLetra>
<LugarNum>5</LugarNum>
<PosX>319</PosX>
<PosY>705</PosY>
</dtResult>
<dtResult diffgr:id="dtResult6" msdata:rowOrder="5">
<ID_EventoLugar>6</ID_EventoLugar>
<ID_Evento>1</ID_Evento>
<LugarLetra>A</LugarLetra>
<LugarNum>6</LugarNum>
<PosX>343</PosX>
<PosY>702</PosY>
</dtResult>
<dtResult diffgr:id="dtResult7" msdata:rowOrder="6">
<ID_EventoLugar>7</ID_EventoLugar>
<ID_Evento>1</ID_Evento>
<LugarLetra>A</LugarLetra>
<LugarNum>7</LugarNum>
<PosX>365</PosX>
<PosY>699</PosY>
</dtResult>
<dtResult diffgr:id="dtResult8" msdata:rowOrder="7">
<ID_EventoLugar>8</ID_EventoLugar>
<ID_Evento>1</ID_Evento>
<LugarLetra>A</LugarLetra>
<LugarNum>8</LugarNum>
<PosX>388</PosX>
<PosY>696</PosY>
</dtResult>
<dtResult diffgr:id="dtResult9" msdata:rowOrder="8">
<ID_EventoLugar>9</ID_EventoLugar>
<ID_Evento>1</ID_Evento>
<LugarLetra>A</LugarLetra>
<LugarNum>9</LugarNum>
<PosX>410</PosX>
<PosY>694</PosY>
</dtResult>
<dtResult diffgr:id="dtResult10" msdata:rowOrder="9">
<ID_EventoLugar>10</ID_EventoLugar>
<ID_Evento>1</ID_Evento>
<LugarLetra>A</LugarLetra>
<LugarNum>10</LugarNum>
<PosX>432</PosX>
<PosY>691</PosY>
</dtResult>
<dtResult diffgr:id="dtResult11" msdata:rowOrder="10">
<ID_EventoLugar>11</ID_EventoLugar>
<ID_Evento>1</ID_Evento>
<LugarLetra>A</LugarLetra>
<LugarNum>11</LugarNum>
<PosX>455</PosX>
<PosY>690</PosY>
</dtResult>
</DocumentElement>
</diffgr:diffgram>
</DataTable>
Can someone help me trying to read this data?

Thanks!!
 
  • Like
Reactions: ajk

Reviewnow

Active Member
Licensed User
Longtime User
The Attached Example will get you started

This example shows 3 primary principles
How to read xml and store it in a database
How to call the soap server via a Service Module
how to show the parsed xml in a web view

Your Data was used as the example

Have Fun
 

Attachments

  • dtResult.zip
    14 KB · Views: 455
Upvote 0

jaraiza

Active Member
Licensed User
Longtime User
The Attached Example will get you started
This example shows 3 primary principles
How to read xml and store it in a database
How to call the soap server via a Service Module
how to show the parsed xml in a web view

Your Data was used as the example

Have Fun

I'll study your code, I'll try to avoid using DB and just parsing ListOfMaps data :)

Thanks!
 
Upvote 0
Top