Page 1 of 1

doubled xml nodes

Posted: Tue Feb 26, 2013 2:40 am
by Don

I have an XML that was generated from a website table. As such, the XML has doubled notes (see below).

Autocreate maps the TD nodes as TD.
When I link this, it does show the first TD in the app.
How can I get the second column to display?

I tried changing to TD[0] and TD[1] - but that did not work.

(I also have another XML where a table is converted to XML and there are 5 columns).

precode
<?xml version="1&#46;0" encoding="UTF-8"?>
<DATA>
<TR>
<TD>my id 1<&#47;TD>
<TD>my data 1<&#47;TD>
<&#47;TR>
<TR>
<TD>my id 1<&#47;TD>
<TD>my data 1<&#47;TD>
<&#47;TR>
<TR>
<TD>my id 1<&#47;TD>
<TD>my data 1<&#47;TD>
<&#47;TR>
<&#47;DATA>
/code/pre


doubled xml nodes

Posted: Tue Feb 26, 2013 11:18 am
by Maryna Brodina

Hello! Sorry for delay. Working on it. I'll update...


doubled xml nodes

Posted: Tue Feb 26, 2013 1:33 pm
by Don

Hi Marina,

Thank you... let me know if you require any additional details.
Below is what the REST response looks like in the appbuilder.

Image


doubled xml nodes

Posted: Tue Feb 26, 2013 1:37 pm
by Maryna Brodina

Thank you. For now no additional information is needed. Still working on it


doubled xml nodes

Posted: Tue Feb 26, 2013 2:47 pm
by Maryna Brodina

On screen add Grid (in Grid as many columns as you have in responce) and one row. In each row is one Label component. Map TR to mobileGrid and in mapping add next JS:

codevar cells = $('[data-role="tiggr_label"]', element);
var i, len;
for (i = 0, len = Math&#46;min(value['TD']&#46;length, cells&#46;size()); i < len; i++) {
$(cells)&#46;html(value['TD']);
}/code


doubled xml nodes

Posted: Tue Feb 26, 2013 3:33 pm
by Don

That worked perfectly... many thanks.

Tiggzi App Builder and the support is amazing !!!