DocumentBuilderFactory isXIncludeAware() Method



Description

The Javax.xml.parsers.DocumentBuilderFactory.isXIncludeAware() method gets state of XInclude processing.

Declaration

Following is the declaration for Javax.xml.parsers.DocumentBuilderFactory.isXIncludeAware() method

public boolean isXIncludeAware()

Parameters

NA

Return Value

This method returns the current state of XInclude processing

Exception

NA

Example

The following example shows the usage of Javax.xml.parsers.DocumentBuilderFactory.isXIncludeAware() method.

package com.tutorialspoint;

import javax.xml.parsers.DocumentBuilderFactory;

public class DocumentBuilderFactoryDemo {

   public static void main(String[] args) {

      // create a new DocumentBuilderFactory
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

      // check if factory is XInclude processing
      System.out.println("" + factory.isXIncludeAware());

      // change this configuration
      factory.setXIncludeAware(true);

      // check if factory is XInclude processing
      System.out.println("" + factory.isXIncludeAware());


   }
}

If we compile the code and execute it, this will produce the following result −

false
true
javax_xml_parsers_documentbuilderfactory.htm
Advertisements