Package com.caucho.xml

Examples of com.caucho.xml.XmlParser


      os.flush();

      ReadStream is = new ReadStream(stream);
   
      ListHandler handler = new ListHandler(getPath());
      XmlParser parser = new XmlParser();
      parser.setContentHandler(handler);

      parser.parse(is);

      is.close();
      os.close();
      stream.close();
View Full Code Here


        Document doc = null;
        try {
          if (isStrict)
            doc = new Xml().parseDocument(is);
          else {
            XmlParser parser = new Html();
            parser.setEntitiesAsText(true);
            doc = parser.parseDocument(is);
          }
        } finally {
          is.close();
        }
View Full Code Here

                              int depth)
    throws ServletException, IOException
  {
    InputStream is = req.getInputStream();
    PropfindHandler handler = new PropfindHandler();
    XmlParser parser = new XmlParser();
    parser.setContentHandler(handler);
   
    try {
      parser.parse(is);
    } catch (SAXException e) {
      sendError(res, out, res.SC_BAD_REQUEST, "Bad Request for PROPFIND",
                String.valueOf(e));
      return;
    }
View Full Code Here

                               int depth)
    throws ServletException, IOException
  {
    InputStream is = req.getInputStream();
    ProppatchHandler handler = new ProppatchHandler();
    XmlParser parser = new XmlParser();
    parser.setContentHandler(handler);
   
    try {
      parser.parse(is);
    } catch (SAXException e) {
      sendError(res, out, res.SC_BAD_REQUEST, "Bad Request for PROPPATCH",
                "Bad Request: " + e);
      return;
    }
View Full Code Here

      else
        throw new JspException(L.l("x:parse requires a body"));

      InputSource is = new InputSource(reader);

      XmlParser parser = new Xml();

      Document doc = parser.parseDocument(is);

      reader.close();

      if (_var != null)
        CoreSetTag.setValue(pageContext, _var, _scope, doc);
View Full Code Here

  private CauchoDocument parseXtp()
    throws IOException, ServletException
  {
    ReadStream is = _sourcePath.openRead();
    try {
      XmlParser parser;
     
      if (_strictXml) {
        parser = new Xml();
        parser.setEntitiesAsText(_entitiesAsText);
      }
      else {
        parser = new Html();
        parser.setAutodetectXml(true);
        parser.setEntitiesAsText(true);
        // parser.setXmlEntitiesAsText(entitiesAsText);
        parser.setToLower(_toLower);
      }

      parser.setResinInclude(true);
      parser.setJsp(true);

      return (CauchoDocument) parser.parseDocument(is);
    } catch (Exception e) {
      JspParseException jspE = JspParseException.create(e);
     
      jspE.setErrorPage(_errorPage);
     
View Full Code Here

      else
  throw new JspException(L.l("x:parse requires a body"));

      InputSource is = new InputSource(reader);

      XmlParser parser = new Xml();

      Document doc = parser.parseDocument(is);

      reader.close();

      if (_var != null)
        CoreSetTag.setValue(pageContext, _var, _scope, doc);
View Full Code Here

                              int depth)
    throws ServletException, IOException
  {
    InputStream is = req.getInputStream();
    PropfindHandler handler = new PropfindHandler();
    XmlParser parser = new XmlParser();
    parser.setContentHandler(handler);
   
    try {
      parser.parse(is);
    } catch (SAXException e) {
      sendError(res, out, res.SC_BAD_REQUEST, "Bad Request for PROPFIND",
                String.valueOf(e));
      return;
    }
View Full Code Here

                               int depth)
    throws ServletException, IOException
  {
    InputStream is = req.getInputStream();
    ProppatchHandler handler = new ProppatchHandler();
    XmlParser parser = new XmlParser();
    parser.setContentHandler(handler);
   
    try {
      parser.parse(is);
    } catch (SAXException e) {
      sendError(res, out, res.SC_BAD_REQUEST, "Bad Request for PROPPATCH",
                "Bad Request: " + e);
      return;
    }
View Full Code Here

        Document doc = null;
        try {
          if (isStrict)
            doc = new Xml().parseDocument(is);
          else {
            XmlParser parser = new Html();
            parser.setEntitiesAsText(true);
            doc = parser.parseDocument(is);
          }
        } finally {
          is.close();
        }
View Full Code Here

TOP

Related Classes of com.caucho.xml.XmlParser

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.