I need to generate XML tags for an array but am running into problems.
That is, I can request a single record and by specifying (within the
tcf) out parameters for each column returned, get that in XML
E.g.,
in --> ID
out <--- Fname
out <---Lname
Webservices output
<Fname>Dan</Fname>
<Lname>Smith</Lname>
*******
But if I need a list of all the first and last names and thus
retrieve an array of "allnames", I have to create a new array to
represent each row with non-array delimited columns (I use pipes in
this example) (<@rows array=allnames><@var method$allnames
[<@currow>,fname]>|<@var method$allnames[<@currow>,lname]><@var
rdelim></@rows>) and I can then generate this:
<names>
<witangostring>Dan|Smith</witangostring>
<witangostring>John|Jones</witangostring>
</names>
While this works, we lose the clarity of the XML. In addition, I have
a request to generate XML with an array within an array (for example,
names with multiple phone numbers varying from 1 to 5), and that will
be even less clear to the recipient. So I'd like to use XML for this,
if at all possible.
If I attempt to manufacture the array with XML tags (<@rows
array=allnames><fname><@var method$allnames[<@currow>,fname]></
fname><lname><@var method$allnames[<@currow>,lname]></lname></
@rows>), I get the following webservice output
<names>
<witangostring><fname>Dan</fname><lname>Smith</
lname></witangostring>
<witangostring><fname>John</fname><lname>Jones</
lname></witangostring>
</names>
1] Is there something I am doing wrong?
2] Or if not, is there a workaround? I toyed around with different
encodings (none, html) but these did not work to resolve the problem.
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf