[Simple-support] Fwd: about Element OR Text
Brought to you by:
niallg
|
From: Jaewoo L. <dl...@gm...> - 2012-12-27 04:33:55
|
I would correct something about following output code in my previous
question .
<tr>
<td>
*<content/>*Resuscitation status</td>
<td>
<content ID="AD1">Do not resuscitate</content>
</td>
<td>
*<content/>*Dr. Robert Dolin, Nov 07, 1999</td>
<td>
<linkHtml
href="AdvanceDirective.b50b7910-7ffb-4f4c-bbe4-177ed68cbbf3.pdf">Advance
directive</linkHtml>
</td>
</tr>
bold <content> elements are EMPTY elements.
Why are they included in <td> element?
---------- Forwarded message ----------
From: Jaewoo Lee <dl...@gm...>
Date: 2012/12/27
Subject: Re: about Element OR Text
To: sim...@li...
Thank you for your answer.
I have more question.
I did version up to 2.6.9
and I used @ElementListUnion with @Text annotation. but found something
wrong.
following code is target source
<tr>
<td>Resuscitation status</td>
<td>
<content ID="AD1">Do not resuscitate</content>
</td>
<td>Dr. Robert Dolin, Nov 07, 1999</td>
<td>
<linkHtml
href="AdvanceDirective.b50b7910-7ffb-4f4c-bbe4-177ed68cbbf3.pdf">Advance
directive</linkHtml>
</td>
</tr>
as I told you, I need a <td> class type defined between sub element OR text.
So I defined <td> class like this.
@Root
public class StrucDocTd
{
@Text
@ElementListUnion({
@ElementList(entry = "content", inline = true, required = false, type
= StrucDocContent.class),
@ElementList(entry = "linkHtml", inline = true, required = false, type
= StrucDocLinkHtml.class)
})
protected List<Object> v;
}
but, output is something wrong.
<tr>
<td>
<content/>Resuscitation status</td>
<td>
<content ID="AD1">Do not resuscitate</content>
</td>
<td>
<content/>Dr. Robert Dolin, Nov 07, 1999</td>
<td>
<linkHtml
href="AdvanceDirective.b50b7910-7ffb-4f4c-bbe4-177ed68cbbf3.pdf">Advance
directive</linkHtml>
</td>
</tr>
text codes was inserted in sub-element(content).
Could you let me know whether I coded wrong or not?
and Does "normal annotation" that you said mean my annotation?
Thank you for your help.
2012/12/27 Niall Gallagher <gal...@ya...>
> I don't think you need either to parse the XML in your mail. Parsing with
> normal annotations will work. Also as of 2.6.9 there is in build ability to
> grab floating text in the InputNode, so you don't need the hack job.
>
>
> --- On Wed, 26/12/12, Jaewoo Lee <dl...@gm...> wrote:
>
> > From: Jaewoo Lee <dl...@gm...>
> > Subject: [Simple-support] about Element OR Text
> > To: sim...@li...
> > Received: Wednesday, 26 December, 2012, 12:51 AM
> > Hi, I'm converting from
> > javax to simple framework.I have a question
> > about that.
> > this is original xml source.
> > ....
> >
> > <tr>
> > <td>Resuscitation status</td>
> > <td>
> > <content ID="AD1">Do not
> > resuscitate</content>
> > </td>
> > <td>Dr. Robert Dolin, Nov 07,
> > 1999</td>
> > <td>
> > <linkHtml
> > href="AdvanceDirective.b50b7910-7ffb-4f4c-bbe4-177ed68cbbf3.pdf">Advance
> > directive</linkHtml>
> > </td>
> >
> > </tr>....
> > I saw the example
> > "HackJobToGrabFloatingTextTest", but I am not sure
> > whether I have to implement like that example.
> > cuz I only need ONE node between element OR
> > text.
> > Q1. Should I use Converter class
> > in this case?
> > Q2. If i should use converter
> > class like "HackJobToGrabFloatingTextTest", is it
> > possible to implement like original code?
> > and if yes, could you explain in more
> > details?
> > Thank you so much for your
> > help.
> >
> > -----Inline Attachment Follows-----
> >
> >
> ------------------------------------------------------------------------------
> > LogMeIn Rescue: Anywhere, Anytime Remote support for IT.
> > Free Trial
> > Remotely access PCs and mobile devices and provide instant
> > support
> > Improve your efficiency, and focus on delivering more
> > value-add services
> > Discover what IT Professionals Know. Rescue delivers
> > http://p.sf.net/sfu/logmein_12329d2d
> > -----Inline Attachment Follows-----
> >
> > _______________________________________________
> > Simple-support mailing list
> > Sim...@li...
> > https://lists.sourceforge.net/lists/listinfo/simple-support
> >
>
|