code: public static void setNamespace(Element element, String namespace,
              String schemaLocation) {
          element.setAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
                  XMLConstants.XMLNS_ATTRIBUTE, namespace);
          element.setAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, XMLNS_XSI,
                  XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
          element.setAttributeNS(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI,
                  XSI_SCHEMA_LOCATION, schemaLocation);
      }
docs: Sets the namespace to specific element.
  
  @param element the element to set
  @param namespace the namespace to set
  @param schemaLocation the XML schema file location URI