Hi,

It seems that if we have empty tags in the xml document it occurs

    this execption :

Error parsing document (line 68, col 15)

    org.xmlpull.v1.XmlPullParserException: start tag
unexpected
    character < (position: TEXT seen
    ...</DadosVeiculos>n<DadosOficina<... @68:15)
     at org.xmlpull.mxp1.MXParser.parseStartTag (MXParser.java:1803)
     at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1259)
     at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
     at org.jibx.runtime.impl.UnmarshallingContext.isAt(Unknown Source)
     at
    pt.aps.details.cids.mensagem.JiBX_MS_CIDSInfoOficinaDetails_access.isPresent
    ()
     at

pt.aps.details.cids.mensagem.MensagemCIDSDetails.JiBX_MS_CIDS_unmarshal_2_2(MensagemCIDSDetails.java)
     at

pt.aps.cids.mensagem.MensagemCIDSLN.JiBX_MS_CIDS_unmarshal_2_2(MensagemCIDSLN.java)
     at
    pt.aps.cids.mensagem.JiBX_MS_CIDSMensagemCIDSLN_access.unmarshal ()
     at
    org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement (Unknown
    Source)
     at
    org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(Unknown
    Source)
     at pt.aps.batch.Batch.unMarshall(Batch.java:172)
    ...

Dennis, the character encoding we are using is the UTF-8, but it seems that this is not a encoding problem because it happens to with different encodings like ISO-8859-1.

The unmarshal only works when we put something ( whitespace, <enter> , ...) inside the tag.

 I've already check the document in a hex byte viewer and i didn't found nothing weird in the bytes making up the tag.

Any other ideas?

cheers



 
On 01/11/05, Dennis Sosnoski <[EMAIL PROTECTED]> wrote:
Hi Nuno,

I've never seen anything like this, though it may be some kind of subtle
error in the character handling. What character encoding are you using
in your document? Also, try adding some more whitespace before the
<DadosOficina> start tag and see if that makes a difference. Finally,
check your document in a hex byte viewer to make sure there's nothing
weird in the bytes making up that start tag (depending on the encoding,
this could take several different forms).

- Dennis

Nuno Ferreira wrote:

>     Hi,
>
>     We having a problem parsing a xml document to do the unMarshall
>     method.
>
>     It seems that if we have empty tags in the xml document it occurs
>     this execption :
>
>     Error parsing document (line 68, col 15)
>     org.xmlpull.v1.XmlPullParserException : start tag unexpected
>     character < (position: TEXT seen
>     ...</DadosVeiculos>\n<DadosOficina<... @68:15)
>      at org.xmlpull.mxp1.MXParser.parseStartTag (MXParser.java:1803)
>      at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1259)
>      at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
>      at org.jibx.runtime.impl.UnmarshallingContext.isAt(Unknown Source)
>      at
>     pt.aps.details.cids.mensagem.JiBX_MS_CIDSInfoOficinaDetails_access.isPresent
>     ()
>      at
>     pt.aps.details.cids.mensagem.MensagemCIDSDetails.JiBX_MS_CIDS_unmarshal_2_2(MensagemCIDSDetails.java )
>      at
>     pt.aps.cids.mensagem.MensagemCIDSLN.JiBX_MS_CIDS_unmarshal_2_2(MensagemCIDSLN.java)
>      at
>     pt.aps.cids.mensagem.JiBX_MS_CIDSMensagemCIDSLN_access.unmarshal ()
>      at
>     org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unknown
>     Source)
>      at
>     org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(Unknown
>     Source)
>      at pt.aps.batch.Batch.unMarshall(Batch.java:172)
>     ...
>
>     This is a small example of my xml, with the tag
>     <DadosOficina></DadosOficina> with no text or elements.
>
>                  <DadosVeiculos>
>                     <ChassisCredora>DSAJKL</ChassisCredora>
>                     <ChassisDevedora>AJKSDJKL</ChassisDevedora>
>                     <MarcaCredora>Z12</MarcaCredora>
>                     <DescMarcaCredora>DFSJKDFJKL</DescMarcaCredora>
>                     <ModeloCredora>1</ModeloCredora>
>                     <DescModeloCredora>SKSJKJKL</DescModeloCredora>
>                     <TipoVeiculo>1031</TipoVeiculo>
>                     <VersaoVeiculo>KJAKDS</VersaoVeiculo>
>                     <AnoConstrucao>2000</AnoConstrucao>
>                     <QuantificacaoExtras>12</QuantificacaoExtras>
>                     <ValorExtras>1000,0</ValorExtras>
>                 </DadosVeiculos>
>                 <DadosOficina></DadosOficina>
>
>     We do a test and place an <Enter> inside the tag.
>     <DadosOficina>
>     </DadosOficina>
>
>     It works, but it´s very bad do this kind of thing.
>
>     Does anybody have an idea about this???
>
>     cheers
>
>


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to