m trying using the JAXB annotations to send and xml file but I saw that the nodes has this format:
<:subject xmlns="http://www..." xmlns:atom="http://www.w3.org/2005/atom">
<:data>maths<:data>
</:subject>
而不是:
<subject xmlns="http://www..." xmlns:atom="http://www.w3.org/2005/atom">
<data>maths<data>
</subject>
I can t understand why this happens. From where insert the : symbol and why? T
My model has this form:
@XmlRootElement(name="subject")
@XmlAccessorType(XmlAccessType.FIELD)
public class Registration {
private String data;
get/set
}
我的包裹——Info.java:
@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;
我认为:
<%@ 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="/takedata" />
<form:form modelAttribute="takedataAttribute" method="POST" action="${takeinto}">
<table>
<tr>
<td><form:label path="data">Affiliation</form:label></td>
<td><form:input path="data"/></td>
</tr>
谁能告诉我,文号是:出现在什么?