Note that there are some explanatory texts on larger screens.

plurals
  1. POJAXB supress XSI and xmlns
    primarykey
    data
    text
    <p>I am using JAXB to marshall some groovy objects. I am getting output like this:</p> <pre><code>&lt;desiredskillslist&gt; &lt;employeeDesiredSkills xsi:type="employeeDesiredSkill" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;name&gt;C Development&lt;/name&gt; &lt;/employeeDesiredSkills&gt; &lt;employeeDesiredSkills xsi:type="employeeDesiredSkill" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;name&gt;Perl Development&lt;/name&gt; &lt;/employeeDesiredSkills&gt; &lt;employeeDesiredSkills xsi:type="employeeDesiredSkill" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;name&gt;Java Development&lt;/name&gt; &lt;/employeeDesiredSkills&gt; &lt;employeeDesiredSkills xsi:type="employeeDesiredSkill" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;name&gt;Database Design&lt;/name&gt; &lt;/employeeDesiredSkills&gt; &lt;employeeDesiredSkills xsi:type="employeeDesiredSkill" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;name&gt;Grails Development&lt;/name&gt; &lt;/employeeDesiredSkills&gt; </code></pre> <p></p> <p>I really dont want the <code>xsi:type=</code> and <code>xmlns:xsi=</code> to show up in my final document, since it wont need it. Is this possible?</p> <p>Also - I set up an <code>@XmlElementWrapper(name="desiredskillslist")</code> to put the tags around the <code>employeeDesiredSkills</code>, but if at all possible, I'd ratherjust not have the <code>&lt;employeeDesiredSkillsT&gt;</code> tags at all - if itw as just the list of names, that'd be great. Why is it coming out like this when I annotated the <code>ArrayList</code>?</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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