Examples of newDocumentBuilder()


Examples of com.dotcms.repackage.javax.xml.parsers.DocumentBuilderFactory.newDocumentBuilder()

      VelocityEngine ve = VelocityUtil.getEngine();
      ve.getTemplate("/" + location + "/" + pageIdent + "." + VELOCITY_HTMLPAGE_EXTENSION).merge(context, sw);
      ITextRenderer renderer = new ITextRenderer();
      DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
      documentBuilderFactory.setValidating(false);
      DocumentBuilder builder = documentBuilderFactory.newDocumentBuilder();
      builder.setEntityResolver(new DTDResolver());
      String s = sw.toString();
      s = escapeEspecialCharacter(s);

      s = processCSSPath(s, host, "css", "\\(", "\\)", ")", url);
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilderFactory.newDocumentBuilder()

    try {
      // Transform the text representation to DOM
      DocumentBuilderFactory fact=DocumentBuilderFactory.newInstance();
      fact.setNamespaceAware(true);
     
      DocumentBuilder builder=fact.newDocumentBuilder();
     
      // Check if XML document, and if not return as text node
      if (text.trim().length() == 0 || text.charAt(0) != '<') {
        org.w3c.dom.Document doc=builder.newDocument();
       
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilderFactory.newDocumentBuilder()

    private static Document buildDocument(InputStream is) {
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        final Document doc;
        try {
            DocumentBuilder db = dbf.newDocumentBuilder();
            doc = db.parse(is);
        } catch (Exception e) {
            throw new IllegalStateException("buildDocument failed!", e);
        }
        return doc;
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilderFactory.newDocumentBuilder()

    {

      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      factory.setNamespaceAware(true);
      factory.setValidating(true);
      DocumentBuilder builder = factory.newDocumentBuilder();

      ErrorHandler errorHandler = new ErrorHandler() {

        public void warning(org.xml.sax.SAXParseException e)
        {
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilderFactory.newDocumentBuilder()

        Document doc;
        try {
            // read the schema to DOM representation
            DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance();
            fact.setNamespaceAware(true);
            DocumentBuilder bldr = fact.newDocumentBuilder();
            doc = bldr.parse(m_wsdlProvider.getWSDL(req));
            Element schema = doc.getDocumentElement();
            NodeList services = schema.getElementsByTagNameNS(WSDLSOAP_NAMESPACE, "address");
            for (int i = 0; i < services.getLength(); i++) {
                Node node = services.item(i).getAttributes().getNamedItem("location");
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilderFactory.newDocumentBuilder()

    public static DocumentBuilder newDocumentBuilder()
            throws ParserConfigurationException {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setValidating(false);
        factory.setNamespaceAware(false);
        DocumentBuilder builder = factory.newDocumentBuilder();

        return builder;
    }

    public static Document getAsDocument(String xmlString) throws SAXException,
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilderFactory.newDocumentBuilder()

    public List<JavaOneInterval> parse(InputStream is) throws Exception {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setValidating(false);
        factory.setNamespaceAware(false);
        DocumentBuilder builder = factory.newDocumentBuilder();
        Document doc = builder.parse(is);
        return parse(doc);
    }

    public List<JavaOneInterval> parse(Document doc) {
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilderFactory.newDocumentBuilder()

      return (T) new SAXSource(new InputSource(getBinaryStream()));
    } else if (sourceClass == DOMSource.class) {
      try {
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        dbf.setNamespaceAware(true);
        DocumentBuilder docBuilder = dbf.newDocumentBuilder();
              Node doc = docBuilder.parse(new InputSource(getBinaryStream()));
              return (T) new DOMSource(doc);
      } catch (ParserConfigurationException e) {
        throw new SQLException(e);
      } catch (SAXException e) {
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilderFactory.newDocumentBuilder()

     */
    public MappingDocument loadDocument(InputStream stream) throws MappingException {
        try {
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setValidating(false);
            DocumentBuilder db = dbf.newDocumentBuilder();
            Document doc = db.parse(stream);
            return loadContents(doc);
        } catch (IOException e) {
            throw new MappingException(e);
        } catch (ParserConfigurationException e) {
View Full Code Here

Examples of javax.xml.parsers.DocumentBuilderFactory.newDocumentBuilder()

  private Document loadXmlFrom(InputStream is) throws SAXException, IOException {
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    DocumentBuilder builder = null;
    try {
      builder = factory.newDocumentBuilder();
    } catch (ParserConfigurationException ex) { }
    return builder.parse(is);
  }
 
  private void considerRepairs(Document doc, Element root) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.