The easiest way to handle this is to just add a <mapping> for the copyright element in your binding. If this is always the last thing in the <unip> content you can check when you've unmarshalled the copyright object and exit the loop at that point.

 - Dennis

Tamas Hegedus wrote:

Hi,

1st of all: I could parse almost my complete xml file; I like the performance of JiBX!

Question:
My xml file has the following struct:
<unip>
  <entry>...</entry>
  <entry>...</entry>
  ...
  <copyright>...</copyright>
</unip>

I parse the <entry> into UniP.
uctx.parsePastStartTag( null, "unip");
while ( !uctx.isEnd()) {
    Object obj = uctx.unmarshalElement();
    UniP up = (UniP) obj;
    System.out.println( i + " " + up.toString());
    i++;
}
But after the last <entry> in the xml file this unmarshaling cycle find one <copyright>text</copyright> tag =>> exception. After unmarshaling several thousands of UniP objects I would like to unmarshal the copyright into a 'CopyR' object. How can I do this?

Thank you in advance,
Tamas



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