Hi,

I have an XML document that looks like this:

<report
        name="myreport"
        reportVersion="1.1"
        shortDescription="short description here"
        longDescription="some text here. 
        <P>
        more text here."
>
.
.
</report>

I get an exception when JIBX tries to unmarshall this document because
of the <P> in the field longDescription. Is there a way around this? I
tried ignoring the field longDescription but that does not work either.

Here is the exception:
org.xmlpull.v1.XmlPullParserException: markup not allowed inside
attribute value - illegal <  (position: START_DOCUMENT seen ...some
text here.\n<... @37:2) 
        at org.xmlpull.mxp1.MXParser.parseAttribute(MXParser.java:2028)
        at org.xmlpull.mxp1.MXParser.parseStartTag(MXParser.java:1802)
        at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1502)
        at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1418)
        at org.xmlpull.mxp1.MXParser.next(MXParser.java:1137)
        at
org.jibx.runtime.impl.UnmarshallingContext.toStart(UnmarshallingContext.java:505)
        at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2508)
        at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2689)

My binding.xml looks like:
<mapping name="report" class="com.xyz.model.report.Report"
value-style="attribute">
        <structure field="_metaData">
                <value name="name" field="_name"/>
                <value name="reportVersion" field="_reportVersion"/>
                <value name="shortDescription" field="_shortDescription"/>
                <value name="longDescription" field="_longDescription"/>
        </structure>
…
</mapping>

Thanks,

Anirban


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to