Package com.caucho.xml

Examples of com.caucho.xml.Xml


        XslParser parser = new XslParser();

        return parser.parse(file);
      }
      else
        return new Xml().parseDocument(file);
    } catch (org.xml.sax.SAXException e) {
      throw new XslParseException(e);
    } finally {
      file.close();
    }
View Full Code Here


   */
  protected Document parseXSL(ReadStream rs)
    throws TransformerConfigurationException
  {
    try {
      Xml parser = new Xml();

      return parser.parseDocument(rs);
    } catch (Exception e) {
      throw new XslParseException(e);
    }
  }
View Full Code Here

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

        else
          userPath.setUserPath(req.getRequestURI());
        is.setPath(userPath);

        try {
          doc = new Xml().parseDocument(is);
        } finally {
          is.close();
        }
     
        String href = (String) req.getAttribute("caucho.xsl.stylesheet");
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

      DOMBuilder builder = new DOMBuilder();

      builder.init(doc);

      Xml xml = new Xml();
      xml.setOwner(doc);
      xml.setNamespaceAware(false);
      xml.setContentHandler(builder);
      xml.setCoalescing(true);

      if (deploymentPlan != null)
        xml.parse(Vfs.lookup(deploymentPlan.getAbsolutePath()));
      else
        xml.parse(deploymentPlanStream);

      String type = XPath.evalString("/deployment-plan/archive-type", doc);
      String name = XPath.evalString("/deployment-plan/name", doc);

      CommitBuilder commit = new CommitBuilder();
View Full Code Here

    try {
      ParseState parseState = _gen.getParseState();
     
      if (parseState.isXml()) {
        Xml xml = new Xml();
        xml.setContentHandler(new JspContentHandler(parseState.getBuilder()));
        Path path = resolvePath(_file, parseState);

        path.setUserPath(_file);
        xml.setNamespaceAware(true);

        for (Namespace ns = parseState.getNamespaces();
             ns != null;
             ns = ns.getNext()) {
          xml.pushNamespace(ns.getPrefix(), ns.getURI());
        }

        xml.parse(path);
      }
      else
        _gen.getJspParser().pushInclude(_file);
    } catch (SAXException e) {
      throw error(e);
View Full Code Here

    ReadStream is = _sourcePath.openRead();
    try {
      XmlParser parser;
     
      if (_strictXml) {
        parser = new Xml();
        parser.setEntitiesAsText(_entitiesAsText);
      }
      else {
        parser = new Html();
        parser.setAutodetectXml(true);
View Full Code Here

    /**
     * Creates a new document builder.
     */
    XmlDocumentBuilder()
    {
      _parser = new Xml();
      _parser.setConfig(XmlDocumentBuilderFactory.this);
    }
View Full Code Here

    try {
      if (_isHtml)
        doc = new LooseHtml().parseDocument(path);
      else
        doc = new Xml().parseDocument(path);
    } catch (Exception e) {
      log.log(Level.FINE, e.toString(), e);
     
      //XXX:throw new XPathException(e);
    }
View Full Code Here

TOP

Related Classes of com.caucho.xml.Xml

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.