The JiBX documentation is a bit confusing on this point (how to deal
with collections of strings).  Here's what the official docs say:

"In the case of simple values (primitives, or objects which are
represented as simple text strings), you just use one or more nested
value elements (which must use style="element", directly or by default)
instead of structure elements."

What this means is that you want a mapping like this:

<collection add-method="addDataSink">
  <value style="element" name="datasink" />
</collection>

Maybe the docs could use a small sample to help clarify the point?  I'll
submit something to JIRA and see what others think.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tom Kuo
Sent: Wednesday, May 10, 2006 10:05 AM
To: [email protected]
Subject: [jibx-users] Binding of String Array gives Error: Attributes
not allowed as child components of collection; on value element...

Hi,

   Has anyone encountered an error trying to use a binding similar to
the
one below?

        <collection field="datasinks">
          <value name="datasink" type="java.lang.String"/>
        </collection>


I've looked on the mailing list and I found multiple references that
refers
to this structure that will be able to create a data structure like

<someRootNode>
        <datasinks>scott</datasink>
        <datasinks>tiger</datasink>
</someRootNode>

However when I compile or try to create a schema I receive the 
        
Error: Attributes not allowed as child components of collection; on
value
element...

Any help is appreciated!

Tom




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to