<structure field="sourceRef" class="com.syncml.framework.core.SourceRef" usage="optional">
<value name="SourceRef" field="value" usage="optional"/>
</structure>
I can understand what you want this to do, but I don't think the JiBX code generation can. It really should give an error on this, since the way it is now it expects to have an element name for each child <structure> in an unordered list.
There are a couple of ways to handle this, but I'd think the simplest would be to change this definition to:
<structure name="SourceRef" field="sourceRef" usage="optional"> <value field="value" style="text"/> </structure>
Your current binding also has a number of attributes that aren't appropriate for the elements (as with the "class" attribute on a <structure> element). This isn't causing any problems directly, but it probably makes it harder to understand when something is going wrong. You might want to try validating your binding against the binding.xsd schema supplied in the /docs directory.
Your next question is likely to be how to do this. :-) Any volunteers to add a snip in the Wiki about turning on binding file schema validation for editing?
- Dennis
Falk Langhammer wrote:
however, I always get such errors:
org.jibx.runtime.JiBXException: Expected end tag, found start tag"{syncml:devinf}SourceRef"
This means that BEFORE "<SourceRef xmlns='syncml:devinf' ...>..." You have ommitted an element in the XML document which You have a (non-optional) mapping in your binding.xml.
I.e., Your data XML lacks a mandatory element.
Xin Liu wrote:
Hi, all:
I used jibx to parse a xml document (syncml document). Below is the document
Dont expect us to read your XML files...
Regards,
Falk
-- Dennis M. Sosnoski Enterprise Java, XML, and Web Services Training and Consulting http://www.sosnoski.com Redmond, WA 425.885.7197
------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users
