Not well formated xml JAXB

Reevierevedia

New Member
m trying using the JAXB annotations to send and xml file but i saw that the nodes has this format:\[code\]<:subject xmlns="http://www..." xmlns:atom="http://www.w3.org/2005/atom"> <:affiliation>maths<:affiliation></:subject>\[/code\]instead of this:\[code\]<subject xmlns="http://www..." xmlns:atom="http://www.w3.org/2005/atom"> <affiliation>maths<affiliation></subject>\[/code\]I can't understand why this happens. From where insert the : symbol and why?T\[code\]My model has this form:@XmlRootElement(name="subject")@XmlAccessorType(XmlAccessType.FIELD)public class Registration { private String affiliation; get/set}\[/code\]My package-info.java:\[code\] @javax.xml.bind.annotation.XmlSchema ( namespace="http://www..", elementFormDefault=XmlNsForm.QUALIFIED,xmlns = { @javax.xml.bind.annotation.XmlNs( prefix=" ", namespaceURI="http://www..."), @javax.xml.bind.annotation.XmlNs( prefix="atom" ,namespaceURI="http://www.w3.org/2005/atom")}) package mypackage.affil; import javax.xml.bind.annotation.XmlNsForm;\[/code\]My view:\[code\] <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> <%@ page language="java" contentType="text/html"pageEncoding="UTF-8"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head> <meta http-equiv="Content-Type" content="text/html"><title>Insert title here</title></head><body><h1>Create New Person</h1><c:url var="takeinto" value="http://stackoverflow.com/takedata" /><form:form modelAttribute="takedataAttribute" method="POST" action="${takeinto}"><table> <tr> <td><form:label path="affiliation">Affiliation</form:label></td> <td><form:input path="affiliation"/></td> </tr>\[/code\]Can anyone tells my why the symbol : appears?
 
Back
Top