rest-assured/src/main/java/io/restassured/config/XmlConfig.java
public XmlConfig declareNamespace(String prefix, String namespaceURI) {
        Validate.notEmpty(prefix, "Prefix cannot be empty");
        Validate.notEmpty(namespaceURI, "Namespace URI cannot be empty");
        Map<String, String> updatedNamespaces = new HashMap<String, String>(declaredNamespaces);
        updatedNamespaces.put(prefix, namespaceURI);
        return new XmlConfig(features, updatedNamespaces, properties, validating, true, allowDocTypeDeclaration, true);
    }
public XmlConfig declareNamespace(String prefix, String namespaceURI) {
        Validate.notEmpty(prefix, "Prefix cannot be empty");
        Validate.notEmpty(namespaceURI, "Namespace URI cannot be empty");
        Map<String, String> updatedNamespaces = new HashMap<String, String>(declaredNamespaces);
        updatedNamespaces.put(prefix, namespaceURI);
        return new XmlConfig(features, updatedNamespaces, properties, validating, true, allowDocTypeDeclaration, true);
    }
public XmlConfig declareNamespace ( String prefix , String namespaceURI ) { Validate . notEmpty ( prefix , "Prefix cannot be empty" ) ; Validate . notEmpty ( namespaceURI , "Namespace URI cannot be empty" ) ; Map < String , String > updatedNamespaces = new HashMap < String , String > ( declaredNamespaces ) ; updatedNamespaces . put ( prefix , namespaceURI ) ; return new XmlConfig ( features , updatedNamespaces , properties , validating , true , allowDocTypeDeclaration , true ) ; }
Declares a namespace and also sets {@link #namespaceAware(boolean)} to <code>true</code>.
<p/>
<p>Note that you cannot use this to add namespaces for the {@link org.hamcrest.xml.HasXPath} matcher.
This has to be done by providing a {@link javax.xml.namespace.NamespaceContext} to the matcher instance.</p>

@param prefix       The feature name, which is a fully-qualified URI.
@param namespaceURI The requested value of the feature (true or false).
@return A new XmlConfig instance
@see org.xml.sax.XMLReader#setFeature(java.lang.String, boolean)
Declares a namespace and also sets { @link #namespaceAware ( boolean ) } to <code > true< / code > . <p / > <p > Note that you cannot use this to add namespaces for the { @link org . hamcrest . xml . HasXPath } matcher . This has to be done by providing a { @link javax . xml . namespace . NamespaceContext } to the matcher instance . < / p >