Package com.sun.org.apache.xml.internal.serializer

Examples of com.sun.org.apache.xml.internal.serializer.SerializationHandler


    }

        if (_isIdentity) {
            try {
                // Connect this object with output system directly
                SerializationHandler outputHandler =
                    _transformer.getOutputHandler(result);
                _transformer.transferOutputProperties(outputHandler);

                _handler = outputHandler;
                _lexHandler = outputHandler;
View Full Code Here


            }
            // Pass output properties to the translet
            transferOutputProperties(_translet);
        }

        final SerializationHandler toHandler = getOutputHandler(result);
        if (toHandler == null) {
            ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_NO_HANDLER_ERR);
            throw new TransformerException(err.toString());
        }
View Full Code Here

      factory.setEncoding(_encoding);
      factory.setOutputMethod(_method);
      factory.setOutputStream(new BufferedOutputStream(new FileOutputStream(filename, append)));
      factory.setOutputType(TransletOutputHandlerFactory.STREAM);

      final SerializationHandler handler
    = factory.getSerializationHandler();

      transferOutputSettings(handler);
      handler.startDocument();
      return handler;
  }
  catch (Exception e) {
      throw new TransletException(e);
  }
View Full Code Here

      }
      // Pass output properties to the translet
      transferOutputProperties(_translet);
  }
     
  final SerializationHandler toHandler = getOutputHandler(result);
  if (toHandler == null) {
      ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_NO_HANDLER_ERR);
      throw new TransformerException(err.toString());
  }
View Full Code Here

    }

    public SerializationHandler getSerializationHandler()
        throws IOException, ParserConfigurationException
    {
        SerializationHandler result = null;
        switch (_outputType)
        {
            case STREAM :

                if (_method == null)
                {
                    result = new ToUnknownStream();
                }
                else if (_method.equalsIgnoreCase("xml"))
                {

                    result = new ToXMLStream();

                }
                else if (_method.equalsIgnoreCase("html"))
                {

                    result = new ToHTMLStream();

                }
                else if (_method.equalsIgnoreCase("text"))
                {

                    result = new ToTextStream();

                }

                if (result != null && _indentNumber >= 0)
                {
                    result.setIndentAmount(_indentNumber);
                }

                result.setEncoding(_encoding);

                if (_writer != null)
                {
                    result.setWriter(_writer);
                }
                else
                {
                    result.setOutputStream(_ostream);
                }
                return result;

            case DOM :
                _handler = (_node != null) ? new SAX2DOM(_node, _nextSibling) : new SAX2DOM();
View Full Code Here

TOP

Related Classes of com.sun.org.apache.xml.internal.serializer.SerializationHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.