SAXParser isXIncludeAware() Method



Description

The Javax.xml.parsers.SAXParser.isXIncludeAware() method gets the XInclude processing mode for this parser.

Declaration

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

public abstract boolean isXIncludeAware()

Parameters

NA

Return Value

This method returns the return value of the SAXParserFactory.isXIncludeAware() when this parser was created from factory.

Exception

UnsupportedOperationException − When implementation does not override this method

Example

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

package com.tutorialspoint;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

public class SaxParserDemo {

   public static void main(String[] args) {

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

      try {

         // get a new SAXParser
         SAXParser parser = factory.newSAXParser();

         // get the XInclude awareness status
         System.out.println("" + parser.isXIncludeAware());

      } catch (Exception ex) {
         ex.printStackTrace();
      }
   }
}

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

false
javax_xml_parsers_saxparser.htm
Advertisements