retrieving data from select control

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

retrieving data from select control

javier.rivas
Hi,

I am trying to use the select control, but I want to convert the output sequence into a xml.

Now, when I select two elements, I get this output "1 2" (a sequence of the selected item).

But what I would like to do is get some nice xml structure like <id>1</id><id>2</id>

Any help would be really appreciated.

--------

This is my code:

<xforms:instance id="meta" xmlns:x="http://www.w3.org/2001/XMLSchema">
        <bean xmlns="">
                <names/>
        </bean>
</xforms:instance>
             
<xforms:instance id="names">
    <names xmlns="">
         <name xmlns="">
                <id>1</id>
                <value>first</value>
        </name>
        <name xmlns="">
                <id>2</id>
                <value>second</value>
        </name>
        <name xmlns="">
                <id>3</id>
                <value>thrid</value>
        </name>
     </names>
</xforms:instance>     

<xforms:select ref="instance('instance')/names" appearance="compact" navindex="6">
        <xforms:itemset nodeset="instance('names')/name">
                <xforms:label ref="value"/>
                <xforms:value ref="id"/>                                                                               
        </xforms:itemset>
</xforms:select>