Hinzufügen von Namespaces zum Root-Element von XML mit Jaxb

Ich bin erstellen einer xml-Datei, deren root-elemenet Struktur shuould werden wie:

   <RootElement xmlns="http://www.mysite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mysite.com/abc.xsd">

ich erstellt package-info.java Klasse, aber ich kann sich nur ein namespace wird durch das schreiben dieses Codes:

@XmlSchema(
        namespace = "http://www.mysite.com",
        elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package myproject.myapp;
import javax.xml.bind.annotation.XmlSchema;

Irgendeine Idee?

Kommentar zu dem Problem
schemaLocation sollten Paare "{namespace} {schema-uri}" : xsi:schemaLocation="http://www.example.com http://www.example.com/abc.xsd" Kommentarautor: DLight

InformationsquelleAutor der Frage Aquarius24 | 2013-06-07

Schreibe einen Kommentar