Hi, all:
I used jibx to parse a xml document (syncml document). Below is the document
<SyncML>
<SyncHdr>
<VerDTD>1.1</VerDTD>
<VerProto>SyncML/1.1</VerProto>
<SessionID>1</SessionID>
<MsgID>1</MsgID>
<Target><LocURI>http://www.syncml.org/sync-server</LocURI></Target>
<Source><LocURI>IMEI:493005100592800</LocURI></Source>
<Cred>
<Meta xmlns='syncml:metinf'><Type xmlns='syncml:metinf'>syncml:auth-basic</Type></Meta>
<Data>QnJ1Y2UyOk9oQmVoYXZl</Data>
</Cred>
<Meta xmlns='syncml:metinf'>
<MaxMsgSize xmlns='syncml:metinf'>5000</MaxMsgSize>
</Meta>
</SyncHdr>
<SyncBody>
<Alert>
<CmdID>1</CmdID>
<Data>200</Data>
<Item>
<Target><LocURI>./contacts/james_bond</LocURI></Target>
<Source><LocURI>./dev-contacts</LocURI></Source>
<Meta xmlns='syncml:metinf'>
<Anchor xmlns='syncml:metinf'>
<Last>234</Last>
<Next>276</Next>
</Anchor>
</Meta>
</Item>
</Alert>
<Put>
<CmdID>2</CmdID>
<Meta xmlns='syncml:metinf'><Type xmlns='syncml:metinf'>application/vnd.syncml-devinf+xml</Type></Meta>
<Item>
<Source><LocURI>./devinf11</LocURI></Source>
<Data>
<DevInf xmlns='syncml:devinf'>
<VerDTD>1.1</VerDTD>
<Man>Big Factory, Ltd.</Man>
<Mod>4119</Mod>
<OEM>Jane's phones</OEM>
<FwV>2.0e</FwV>
<SwV>2.0</SwV>
<HwV>1.22I</HwV>
<DevID>1218182THD000001-2</DevID>
<DevTyp>phone</DevTyp>
<DataStore>
<SourceRef>./contacts</SourceRef>
<DisplayName>Phonebook</DisplayName>
<MaxGUIDSize>32</MaxGUIDSize>
<Rx-Pref>
<CTType>text/x-vcard </CTType>
<VerCT>2.1</VerCT>
</Rx-Pref>
<Tx-Pref>
<CTType>text/x-vcard</CTType>
<VerCT>2.1</VerCT>
</Tx-Pref>
</DataStore>
<CTCap>
<CTType>text/x-vcard</CTType>
<PropName>BEGIN</PropName>
<ValEnum>VCARD</ValEnum>
<PropName>END</PropName>
<ValEnum>VCARD</ValEnum>
<PropName>VERSION</PropName>
<ValEnum>2.1</ValEnum>
<PropName>N</PropName>
<PropName>TEL</PropName>
<ParamName>VOICE</ParamName>
<ParamName>CELL</ParamName>
</CTCap>
<SyncCap>
<SyncType>01</SyncType>
<SyncType>02</SyncType>
</SyncCap>
</DevInf>
</Data>
</Item>
</Put>
<Get>
<CmdID>3</CmdID>
<Meta xmlns='syncml:metinf'><Type xmlns='syncml:metinf'>application/vnd.syncml-devinf+xml</Type></Meta>
<Item>
<Target><LocURI>./devinf11</LocURI></Target>
</Item>
</Get>
<Final/>
</SyncBody>
</SyncML>


however, I always get such errors:
org.jibx.runtime.JiBXException: Expected end tag, found start tag"{syncml:devinf}SourceRef"


Below is the binding.xml file:
<binding>
<format type="java.lang.Boolean" serializer="com.syncml.framework.core.Util.serializeBoolean"
deserializer="com.syncml.framework.core.Util.deserializeBoolean"
label="formatBoolean"/>


<format type="java.lang.Long" serializer="com.syncml.framework.core.Util.serializeWrapLong"
deserializer="com.syncml.framework.core.Util.deserializeWrapLong"
label="formatWrapLong"/>


   <mapping name="SyncML" class="com.syncml.framework.core.SyncML">
       <structure field="header"/>
       <structure field="body"/>
   </mapping>

<mapping name="SyncHdr" class="com.syncml.framework.core.SyncHdr" field="header">
<structure field="verDTD" class="com.syncml.framework.core.VerDTD">
<value name="VerDTD" field="value"/>
</structure>
<structure field="verProto" class="com.syncml.framework.core.VerProto">
<value name="VerProto" field="version"/>
</structure>
<structure field="sessionID" class="com.syncml.framework.core.SessionID">
<value name="SessionID" field="sessionID"/>
</structure>
<value name="MsgID" field="msgID" />
<structure name="Target" field="target">
<value name="LocURI" field="locURI" />
<value name="LocName" field="locName" usage="optional"/>
</structure>
<structure field="source" class="com.syncml.framework.core.Source"/>
<value name="RespURI" field="respURI" usage="optional"/>


<value name="NoResp" field="noResp" format="formatBoolean" usage="optional"/>

<structure field="cred" class="com.syncml.framework.core.Cred" usage="optional"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
</mapping>


<mapping name="SyncBody" class="com.syncml.framework.core.SyncBody" field="body">
<collection field="commands" item-type="com.syncml.framework.core.AbstractCommand" />


<value name="Final" field="finalMsg" format="formatBoolean" usage="optional"/>

   </mapping>

<mapping class="com.syncml.framework.core.AbstractCommand" abstract="true">
<structure field="cmdID" class="com.syncml.framework.core.CmdID">
<value name="CmdID" field="cmdID"/>
</structure>


<value name="NoResp" field="noResp" format="formatBoolean" usage="optional"/>

<structure field="credential" class="com.syncml.framework.core.Cred" usage="optional"/>
</mapping>


<mapping name="Add" class="com.syncml.framework.core.Add" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
<collection field="items" item-type="com.syncml.framework.core.Item" />
</mapping>


<mapping name="Alert" class="com.syncml.framework.core.Alert" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>
<value name="Data" field="data" usage="optional"/>
<collection field="items" item-type="com.syncml.framework.core.Item"/>
</mapping>


<mapping name="Atomic" class="com.syncml.framework.core.Atomic" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
<collection field="commands" item-type="com.syncml.framework.core.AbstractCommand" />
</mapping>


<mapping name="Copy" class="com.syncml.framework.core.Copy" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
<collection field="items" item-type="com.syncml.framework.core.Item" />
</mapping>


<mapping name="Delete" class="com.syncml.framework.core.Delete" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>


<value name="Archive" field="archive" format="formatBoolean" usage="optional"/>
<value name="SftDel" field="sftDel" format="formatBoolean" usage="optional"/>


<structure field="credential" class="com.syncml.framework.core.Cred" usage="optional"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
<collection field="items" item-type="com.syncml.framework.core.Item" />
</mapping>


<mapping name="Exec" class="com.syncml.framework.core.Exec" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>
<collection field="items" item-type="com.syncml.framework.core.Item" />
</mapping>


<mapping name="Get" class="com.syncml.framework.core.Get" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>
<value name="Lang" field="lang" usage="optional"/>
<structure field="credential" class="com.syncml.framework.core.Cred" usage="optional"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
<collection field="items" item-type="com.syncml.framework.core.Item" />
</mapping>


<mapping name="Map" class="com.syncml.framework.core.Map" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>
<structure name="Target" field="target" class="com.syncml.framework.core.Target">
<value name="LocURI" field="locURI" />
<value name="LocName" field="locName" usage="optional"/>
</structure>
<structure field="source" class="com.syncml.framework.core.Source"/>
<structure field="credential" class="com.syncml.framework.core.Cred" usage="optional"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
<collection field="mapItems" item-type="com.syncml.framework.core.MapItem" />
</mapping>


<mapping name="MapItem" field="mapItems" class="com.syncml.framework.core.MapItem">
<structure name="Target" field="target" class="com.syncml.framework.core.Target">
<value name="LocURI" field="locURI"/>
<value name="LocName" field="locName" usage="optional"/>
</structure>
<structure field="source" class="com.syncml.framework.core.Source"/>
</mapping>


<mapping name="Put" class="com.syncml.framework.core.Put" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>
<value name="Lang" field="lang" usage="optional"/>
<structure field="credential" class="com.syncml.framework.core.Cred" usage="optional"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
<collection field="items" item-type="com.syncml.framework.core.DevInfItem"/>
</mapping>


<mapping name="Replace" class="com.syncml.framework.core.Replace" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
<collection field="items" item-type="com.syncml.framework.core.Item"/>
</mapping>


<mapping name="Results" class="com.syncml.framework.core.Results" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>
<value name="MsgRef" field="msgRef" usage="optional" />
<value name="CmdRef" field="cmdRef" />
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
<collection field="targetRef" item-type="com.syncml.framework.core.TargetRef" usage="optional"/>
<collection field="sourceRef" item-type="com.syncml.framework.core.SourceRef" usage="optional"/>
<collection field="items" item-type="com.syncml.framework.core.Item"/>
</mapping>


<mapping name="Search" class="com.syncml.framework.core.Search" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>


<value name="NoResults" field="noResults" format="formatBoolean" usage="optional"/>

<structure field="credential" class="com.syncml.framework.core.Cred" usage="optional"/>
<value name="Target" field="target" usage="optional" />
<collection field="sources" item-type="com.syncml.framework.core.Source"/>
<value name="Lang" field="lang" usage="optional" />
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>


       <structure name="Data" class="com.syncml.framework.core.Data">
           <value style="text" field="data"/>
       </structure>

   </mapping>

<mapping name="Sequence" class="com.syncml.framework.core.Sequence" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
<collection field="commands" item-type="com.syncml.framework.core.AbstractCommand" />
</mapping>


<mapping name="Status" class="com.syncml.framework.core.Status" extends="com.syncml.framework.core.AbstractCommand">
<structure field="cmdID" class="com.syncml.framework.core.CmdID">
<value name="CmdID" field="cmdID"/>
</structure>


<value name="MsgRef" field="msgRef" usage="optional" />
<value name="CmdRef" field="cmdRef" />
<value name="Cmd" field="cmd"/>
<collection field="targetRef" item-type="com.syncml.framework.core.TargetRef" usage="optional"/>
<collection field="sourceRef" item-type="com.syncml.framework.core.SourceRef" usage="optional"/>


<structure field="credential" class="com.syncml.framework.core.Cred" usage="optional"/>
<structure field="chal" usage="optional"/>


<structure field="data" class="com.syncml.framework.core.Data" usage="optional">
<value name="Data" field="data"/>
</structure>


<collection field="items" item-type="com.syncml.framework.core.Item" usage="optional"/>
</mapping>



<mapping class="com.syncml.framework.core.ResponseCommand" abstract="true" extends="com.syncml.framework.core.AbstractCommand">
<value name="MsgRef" field="msgRef" usage="optional"/>
<value name="CmdRef" field="cmdRef"/>
<collection field="targetRef" item-type="com.syncml.framework.core.TargetRef" usage="optional"/>
<collection field="sourceRef" item-type="com.syncml.framework.core.SourceRef" usage="optional"/>
</mapping>



<mapping name="TargetRef" field="targetRef" class="com.syncml.framework.core.TargetRef">
<value field="value" style="text" usage="optional"/>
</mapping>


<mapping name="SourceRef" field="sourceRef" class="com.syncml.framework.core.SourceRef">
<value field="value" style="text" usage="optional"/>
</mapping>


<mapping class="com.syncml.framework.core.ItemizedCommand" abstract="true" extends="com.syncml.framework.core.AbstractCommand"/>

<mapping name="Chal" field="chal" class="com.syncml.framework.core.Chal">
<structure field="meta" class="com.syncml.framework.core.Meta"/>
</mapping>


   <mapping name="Source" class="com.syncml.framework.core.Source">
       <value name="LocURI" field="locURI"/>
       <value name="LocName" field="locName" usage="optional"/>
   </mapping>

<mapping name="Sync" class="com.syncml.framework.core.Sync" extends="com.syncml.framework.core.AbstractCommand">
<structure map-as="com.syncml.framework.core.AbstractCommand"/>
<structure name="Target" field="target" usage="optional">
<value name="LocURI" field="locURI"/>
<value name="LocName" field="locName" usage="optional"/>
</structure>
<structure field="source" class="com.syncml.framework.core.Source" usage="optional"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
<value name="NumberOfChanges" field="numberOfChanges" usage="optional"/>
<collection field="commands" item-type="com.syncml.framework.core.AbstractCommand" usage="optional"/>
</mapping>


<mapping class="com.syncml.framework.core.Data" abstract="true">
<value field="data" style="text" get-method="getData" set-method="setData" usage="optional"/>
</mapping>


<mapping name="Data" class="com.syncml.framework.core.ComplexData" extends="com.syncml.framework.core.Data">
<structure map-as="com.syncml.framework.core.Data" usage="optional"/>
<structure field="anchor" class="com.syncml.framework.core.Anchor" usage="optional"/>
<structure field="devInf" class="com.syncml.framework.core.DevInf" usage="optional"/>
</mapping>


<mapping name="Anchor" field="anchor" class="com.syncml.framework.core.Anchor">
<namespace uri="syncml:metinf" default="elements"/>
<value name="Last" field="last" usage="optional"/>
<value name="Next" field="next" />
</mapping>


<mapping name="Item" field="items" class="com.syncml.framework.core.Item">
<structure name="Target" field="target" usage="optional">
<value name="LocURI" field="locURI"/>
<value name="LocName" field="locName" usage="optional"/>
</structure>
<structure field="source" class="com.syncml.framework.core.Source" usage="optional"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>


<structure class="com.syncml.framework.core.ComplexData" set-method="setData" get-method="getData" usage="optional"/>
</mapping>


<mapping name="Item" field="items" class="com.syncml.framework.core.DevInfItem">
<structure name="Target" field="target" usage="optional">
<value name="LocURI" field="locURI"/>
<value name="LocName" field="locName" usage="optional"/>
</structure>
<structure field="source" class="com.syncml.framework.core.Source" usage="optional"/>
<structure field="meta" class="com.syncml.framework.core.Meta" usage="optional"/>
<structure field="data" class="com.syncml.framework.core.DevInfData" usage="optional"/>
</mapping>


<mapping name="Data" field="data" class="com.syncml.framework.core.DevInfData">
<structure field="devInf" class="com.syncml.framework.core.DevInf"/>
</mapping>


<mapping name="DevInf" field="devInf" class="com.syncml.framework.core.DevInf" ordered="false">
<namespace uri="syncml:devinf" default="elements"/>


<structure field="verDTD" class="com.syncml.framework.core.VerDTD" usage="optional">
<value name="VerDTD" field="value" usage="optional"/>
</structure>
<value name="Man" field="man" usage="optional"/>
<value name="Mod" field="mod" usage="optional"/>
<value name="OEM" field="oem" usage="optional"/>
<value name="FwV" field="fwV" usage="optional"/>
<value name="SwV" field="swV" usage="optional"/>
<value name="HwV" field="hwV" usage="optional"/>
<value name="DevID" field="devID" usage="optional"/>
<value name="DevTyp" field="devTyp" usage="optional"/>
<value name="UTC" field="utc" format="formatBoolean" usage="optional"/>
<value name="SupportLargeObjs" field="supportLargeObjs" format="formatBoolean" usage="optional"/>
<value name="SupportNumberOfChanges" field="supportNumberOfChanges" format="formatBoolean" usage="optional"/>


<collection field="datastores" item-type="com.syncml.framework.core.DataStore" usage="optional"/>
<collection field="ctCap" item-type="com.syncml.framework.core.CTCap" usage="optional"/>
<collection field="ext" item-type="com.syncml.framework.core.Ext" usage="optional"/>
</mapping>


<mapping name="CTCap" field="ctCap" class="com.syncml.framework.core.CTCap">
<collection field="ctTypeSupported">
<structure value-style="element" type="com.syncml.framework.core.CTTypeSupported">
<value name="CTType" field="ctType" class="com.syncml.framework.core.CTType"/>


<collection field="ctPropParams">
<structure value-style="element" type="com.syncml.framework.core.CTPropParam">
<value name="PropName" field="propName"/>
<collection field="valEnum" usage="optional">
<value name="ValEnum" field="valEnum"/>
</collection>
<value name="DataType" field="dataType" usage="optional"/>
<value name="Size" field="size" usage="optional"/>
<value name="DisplayName" field="displayName" usage="optional"/>
<collection field="ctParameters" usage="optional">
<structure value-style="element" type="com.syncml.framework.core.ContentTypeParameter">
<value name="ParamName" field="paramName"/>
<collection field="valEnum" usage="optional">
<value name="ValEnum" field="valEnum"/>
</collection>
<value name="DataType" field="dataType" usage="optional"/>
<value name="Size" field="size" usage="optional"/>
<value name="DisplayName" field="displayName" usage="optional"/>
</structure>
</collection>


           </structure>
           </collection>

       </structure>
       </collection>
   </mapping>

<mapping name="DataStore" field="datastores" class="com.syncml.framework.core.DataStore" ordered="false">
<structure field="sourceRef" class="com.syncml.framework.core.SourceRef" usage="optional">
<value name="SourceRef" field="value" usage="optional"/>
</structure>
<value name="DisplayName" field="displayName" usage="optional"/>
<value name="MaxGUIDSize" field="maxGUIDSize" usage="optional"/>
<structure name="Rx-Pref" field="rxPref" class="com.syncml.framework.core.ContentTypeInfo">
<value name="CTType" field="ctType"/>
<value name="VerCT" field="verCT" />
</structure>
<collection field="rx" usage="optional">
<structure name="Rx" value-style="element" type="com.syncml.framework.core.ContentTypeInfo" usage="optional">
<value name="CTType" field="ctType"/>
<value name="VerCT" field="verCT" />
</structure>
</collection>
<structure name="Tx-Pref" field="txPref" class="com.syncml.framework.core.ContentTypeInfo" usage="optional">
<value name="CTType" field="ctType"/>
<value name="VerCT" field="verCT" />
</structure>
<collection field="tx" usage="optional">
<structure name="Tx" value-style="element" type="com.syncml.framework.core.ContentTypeInfo">
<value name="CTType" field="ctType"/>
<value name="VerCT" field="verCT" />
</structure>
</collection>
<structure name="DSMem" field="dsMem" class="com.syncml.framework.core.DSMem" usage="optional">
<value name="SharedMem" field="sharedMem" format="formatBoolean" usage="optional"/>
<value name="MaxMem" field="maxMem" usage="optional"/>
<value name="MaxID" field="maxID" usage="optional"/>


</structure>
<structure name="SyncCap" field="syncCap" class="com.syncml.framework.core.SyncCap" usage="optional">
<collection field="syncTypes" item-type="com.syncml.framework.core.SyncType"/>
</structure>
</mapping>


   <mapping name="SyncType" class="com.syncml.framework.core.SyncType">
       <value field="syncType" style="text"/>
   </mapping>

   <mapping name="Ext" field="ext" class="com.syncml.framework.core.Ext">
       <value name="XNam" field="xNam"/>
       <collection field="xVal" usage="optional">
           <value name="XVal" field="xVal"/>
       </collection>
   </mapping>

<mapping name="Cred" class="com.syncml.framework.core.Cred">
<structure field="authentication" class="com.syncml.framework.core.Authentication">
<structure field="meta" class="com.syncml.framework.core.Meta"/>
<value name="Data" field="data" class="com.syncml.framework.core.Data" usage="optional"/>
</structure>
</mapping>


   <mapping name="Meta" class="com.syncml.framework.core.Meta">
   <namespace uri="syncml:metinf" default="elements"/>

       <value name="Format" field="format" usage="optional"/>
       <value name="Type"   field="type"   usage="optional"/>
       <value name="Mark"   field="mark"   usage="optional"/>

<value name="Size" field="size" format="formatWrapLong" usage="optional"/>

<structure name="Anchor" field="anchor" class="com.syncml.framework.core.Anchor" usage="optional">
<value name="Last" field="last" usage="optional"/>
<value name="Next" field="next" />
</structure>
<value name="Version" field="version" usage="optional"/>
<structure name="NextNonce" field="nextNonce" class="com.syncml.framework.core.NextNonce" usage="optional">
<value field="value" style="text"/>
</structure>


<value name="MaxMsgSize" field="maxMsgSize" format="formatWrapLong" usage="optional"/>
<value name="MaxObjSize" field="maxObjSize" format="formatWrapLong" usage="optional"/>


<collection field="emi" usage="optional">
<value name="EMI" field="value" class="com.syncml.framework.core.EMI"/>
</collection>
<structure field="mem" class="com.syncml.framework.core.Mem" usage="optional"/>
</mapping>


   <mapping name="Mem" class="com.syncml.framework.core.Mem">

<value name="SharedMem" field="sharedMem" format="formatBoolean" usage="optional"/>

       <value name="FreeMem" field="freeMem"/>
       <value name="FreeID" field="freeID"/>
   </mapping>

</binding>

Could anyone give me some suggestions of how this problem is caused? I seems that others do not get such errors, I don't konw where I have made anything wrong.
Wish your reply.
Liu Xin


_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail




-------------------------------------------------------
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

Reply via email to