I'm a newb with this project, although I've used jackson as a user for 
years, but never for XML before.

I have XML that looks like this:

    <div type="book" osisID="Obad">
      <chapter osisID="Obad.1">
        <verse osisID="Obad.1.1">
          <w lemma="2377" n="1.0" morph="HNcmsc" id="31xeN">חֲז֖וֹן</w>

I am deserializing into my Java class that looks like this:

public class OsisVerse extends DocumentVerse {
    @JacksonXmlElementWrapper(useWrapping = false)
    @JacksonXmlProperty(localName = "note")
    private List<OsisNote> osisNotes;
    @JacksonXmlProperty(localName = "osisID")
    private String uniqueId;
    @JacksonXmlProperty(localName = "seg")
    private String segment;
    @JacksonXmlElementWrapper(useWrapping = false)
    @JacksonXmlProperty(localName = "w")
    private List<OsisWord> osisWords;

and it de serializes great. (Thanks for a great product, BTW!)

Then I make some changes and serialize it back using the same object and 
here's the output I'm getting.

      <chapters>
        <chapters>
          <verse>
            <words>
              <words id="31yNB" lemma="l/4421" morph="HRd/Ncfsa" n="0" 
x-source-word="לַ/מִּלְחָמָֽה">(...)</words>
            </words>
            <notes/>

Note that in addition to not changing the tags back to "w", it also wrapped 
the list in a tag called words and then only output 1 word tag.

I have stepped through the code and watched it buffer the "w" without the 
list header, so I'm not sure what happened after that, but I"m pulling my 
hair out.

If anyone wants to have a look, you can pull 
https://github.com/ThomHehl/xlate and run SourceTextConverterTest.groovy. 
(Spock test under gradle.)

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-dev/db18059e-ce1c-44a6-8180-ea1fca787075n%40googlegroups.com.

Reply via email to