Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.xml.parsers.DocumentBuilderFactory;

public class Main {
    public static DocumentBuilderFactory newNamespaceAwareFactory() {
        /*
         * TODO return DocumentBuilderFactory.newInstance(
         * "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl",
         * XmlHelper.class.getClassLoader());
         */
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        /*
         * Somewhat required for proper JAXB usage... Really? Why I've wrote
         * that? Default value is false and it seems to works like a charm
         * whatever the value.
         */
        factory.setNamespaceAware(true);
        return factory;
    }
}