Class StAXSAXParser

java.lang.Object
com.nomagic.magicreport.engine.xml.StAXSAXParser

@OpenApiAll public class StAXSAXParser extends Object
Provides a SAX interface for reading an XML document using StAX parser.
Since:
Dec 24, 2009
  • Constructor Details

    • StAXSAXParser

      public StAXSAXParser()
  • Method Details

    • setNamespaceAware

      public void setNamespaceAware(boolean awareness)
      Specifies that the parser produced by this code will provide support for XML namespaces. By default the value of this is set to false.
      Parameters:
      awareness - true if the parser produced by this code will provide support for XML namespaces; false otherwise.
    • setValidating

      public void setValidating(boolean validating)
      Specifies that the parser produced by this code will validate documents as they are parsed. By default the value of this is set to false.
      Parameters:
      validating - true if the parser produced by this code will validate documents as they are parsed; false otherwise.
    • setProperty

      public void setProperty(String name, Object value) throws IllegalArgumentException
      Allows the user to set specific feature/property on the underlying implementation. The underlying implementation is not required to support every setting of every property in the specification and may use IllegalArgumentException to signal that an unsupported property may not be set with the specified value.
      Parameters:
      name - The name of the property (may not be null)
      value - The value of the property
      Throws:
      IllegalArgumentException - if the property is not supported
    • parse

      public void parse(Reader reader, DefaultHandler dh) throws SAXException, IOException
      Parse the content given Reader as XML using the specified DefaultHandler.
      Parameters:
      reader - The Reader containing the content to be parsed.
      dh - The SAX DefaultHandler to use.
      Throws:
      IllegalArgumentException - If the InputSource object is null.
      IOException - If any IO errors occur.
      SAXException - If any SAX errors occur during processing.
      See Also:
    • parse

      public void parse(InputStream stream, DefaultHandler dh) throws SAXException, IOException
      Parse the content given InputStream as XML using the specified DefaultHandler.
      Parameters:
      stream - The InputStream containing the content to be parsed.
      dh - The SAX DefaultHandler to use.
      Throws:
      IllegalArgumentException - If the InputSource object is null.
      IOException - If any IO errors occur.
      SAXException - If any SAX errors occur during processing.
      See Also:
    • parse

      public void parse(InputSource is, DefaultHandler dh) throws SAXException, IOException
      Parse the content given InputSource as XML using the specified DefaultHandler.
      Parameters:
      is - The InputSource containing the content to be parsed.
      dh - The SAX DefaultHandler to use.
      Throws:
      IllegalArgumentException - If the InputSource object is null.
      IOException - If any IO errors occur.
      SAXException - If any SAX errors occur during processing.
      See Also: