Note that there are some explanatory texts on larger screens.

plurals
  1. POMake custom xml from javabean
    primarykey
    data
    text
    <p>I wants to make xml from javabean like below:</p> <pre><code> &lt;tag2&gt;message&lt;/tag2&gt; &lt;tag3&gt;message&lt;/tag3&gt; &lt;tag4 id='UNIQUE MT ID 1'&gt;MOBILE No.&lt;/tag4&gt; </code></pre> <p>I tried below code in javabean:</p> <pre><code> @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "name", propOrder = {"tag2", "tag3", "tag4"}) public class newBean { @XmlElement(required = true) private List&lt;String&gt; tag2; @XmlElement(required = true) private List&lt;String&gt; tag3; @XmlElement(required = true) private List&lt;String&gt; tag4; @XmlPath("tag4/@id") private List&lt;String&gt; id; public List&lt;String&gt; getTag2() { return tag2; } public void setTag2(List&lt;String&gt; tag2) { this.tag2 = tag2; } public List&lt;String&gt; gettag4() { return tag4; } public void settag4(List&lt;String&gt; tag4) { this.tag4 = tag4; } public List&lt;String&gt; getId() { return id; } public void setId(List&lt;String&gt; identifier) { this.id = identifier; } public List&lt;String&gt; gettag3() { return tag3; } public void settag3(List&lt;String&gt; tag3) { this.tag3 = tag3; } } </code></pre> <p>I am getting below error:</p> <pre><code> Errorcom.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions Property id is present but not specified in @XmlType.propOrder this problem is related to the following location: at private java.util.List model.newBean.id at model.newBean </code></pre> <p>Please help me.I am using @XmlPath tag and generating error.I searched alot and found that @XmlPath usage is same as above i used but still getting error.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload