For do this is easy : DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating(true); factory.setNamespaceAware(true); factory.setAttribute(“http://java.sun.com/xml/jaxp/properties/schemaLanguage”, “http://www.w3.org/2001/XMLSchema”);
Category: java
[JAVA] – How to read a XML file ?
Below is an example for do it. DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(“src/products.xml”); NodeList … More
[JAVA] – CDI with beans and interceptors by examples
What is it ? The “Context and Dependency Injection for the Java EE platform” (CDI) is a specification that says … More
[Java] – Design Pattern : How to use ? With code examples and project for you understand
What is it ? Design pattern is an elegant solution to a problem that recurs. STRATEGY When ? The Strategy … More
[Java 8] – Good Card : Default methods, Lambdas, Optional
[Java] – Treating Reflection Exceptions
We need take more care when we work with reflections because we can find the exceptions which we normally find … More
[Java] – Use reflection to call methods
Below is an example to show in a simple way how to we can use reflection to call methods. First, … More
[Java] – Reflection : Create a object using a constructor with arguments
With reflection you can create a object using a constructor with arguments. Bellow is the code for you can check … More
[ Java ] – Create objects by reflection
Simple example for you start understand how to create an objects by reflection : public class ClassMap{ private Map<String,String> map; … More
[Java] – Understanding Reflections !!!
Use: Reflection is commonly used by programs which require the ability to examine or modify the runtime behavior of applications … More