Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

edit xmlns attribute with jaxb marshaller

package myproject.myapp;

import javax.xml.bind.*;

public class Demo {

    public static void main(String[] args) throws Exception {
        JAXBContext jc = JAXBContext.newInstance(RootElement.class);

        RootElement rootElement = new RootElement();

        Marshaller marshaller = jc.createMarshaller();
        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
        marshaller.setProperty(Marshaller.JAXB_SCHEMA_LOCATION, "http://www.mysite.com/abc.xsd");
        marshaller.marshal(rootElement, System.out);
    }

}
Comment

PREVIOUS NEXT
Code Example
Java :: java dateigröße abfragen 
Java :: How to center a print statement text? 
Java :: call to jdbc template each class not by super 
Java :: edit activity main drawer items text color android 
Java :: buffered reader for big integer 
Java :: convert int to array in java 
Java :: zufallszahl java 
Java :: reading txt file javafx 
Java :: ternary search in java 
Java :: public class BigInteger { public static void main(String args[]) { long p=2147483648; } } 
Java :: android java update image dynamically 
Java :: java get difference days without weekends 
Java :: No Duplicate Key on HashMap 
Java :: java unused import statement 
Java :: Java Using range(e1, e2) Method 
Java :: Load collection of strings from console 
Java :: why use var in java 
Java :: java intercambiar la posicion de valores de un array 
Java :: fix intellij resetting the java version everytime you add a dependency 
Java :: Sling authentication handler example 
Java :: is lower java 
Java :: reset status bar color in android 
Java :: how to configure multiple database in spring boot based for uat and dev environment 
Java :: java.lang.IllegalMonitorStateException: object not locked by thread before wait() 
Java :: python to java code conversion 
Java :: int array to map java 
Java :: recursion java 
Java :: java recursion 
Java :: java abstract class 
Java :: java or cpp 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =