Examples of DOMReader


Examples of org.dom4j.io.DOMReader

  /**
   * Create a dom4j DOMReader
   */
  public DOMReader createDOMReader() {
    if (domReader==null) domReader = new DOMReader();
    return domReader;
  }
View Full Code Here

Examples of org.dom4j.io.DOMReader

                org.w3c.dom.Document domDocument = tidy.parseDOM(in, null);

                // now read a dom4j document from
                // JTidy's W3C DOM object

                DOMReader domReader = new DOMReader();
                doc = domReader.read(domDocument);

                LOG.debug(baos.toString());
            }
            catch (Throwable e)
            {
View Full Code Here

Examples of org.dom4j.io.DOMReader

     * @param dom the dome object to convert
     * @return A string representation of the document
     */
    public static String toXml(Document dom)
    {
        return new DOMReader().read(dom).asXML();
    }
View Full Code Here

Examples of org.dom4j.io.DOMReader

            {
                dom4jDoc = (org.dom4j.Document) src;
            }
            else if (src instanceof org.w3c.dom.Document)
            {
                DOMReader xmlReader = new DOMReader();
                dom4jDoc = xmlReader.read((org.w3c.dom.Document)src);
            }
            else
            {
                throw new IllegalArgumentException(CoreMessages.objectNotOfCorrectType(
                        src.getClass(), new Class[]{org.w3c.dom.Document.class, Document.class, String.class, byte[].class}).getMessage());
View Full Code Here

Examples of org.dom4j.io.DOMReader

    {
        // This is only used during roundtrip test, so it will always be Document
        // instances
        if (expected instanceof Document)
        {
            expected = new DOMReader().read((Document)expected).asXML();
            result = new DOMReader().read((Document)result).asXML();
        }

        return super.compareResults(expected, result);
    }
View Full Code Here

Examples of org.dom4j.io.DOMReader

      final ResourceManager resourceManager = new ResourceManager();
      resourceManager.registerDefaults();
      final Resource resource = resourceManager.createDirectly(xulDocument, Document.class);
      final Document document = (Document) resource.getResource();
      final DOMReader domReader = new DOMReader();
      final XulDomContainer container = loader.loadXulFragment(domReader.read(document));


      // Create our main Controller
      final String className = configuration.getConfigProperty
          ("org.pentaho.reporting.designer.core.editor.drilldown.xul-controller." + configurationTag, // NON-NLS
View Full Code Here

Examples of org.dom4j.io.DOMReader

        }
       
        parser.parse(inputSource);
        org.w3c.dom.Document w3cDoc = parser.getDocument();
       
        DOMReader xmlReader = new DOMReader();
        return xmlReader.read(w3cDoc);
       
    }
View Full Code Here

Examples of org.dom4j.io.DOMReader

       
        DOMParser parser = new DOMParser();
        parser.parse(new InputSource(new StringReader(html)));
        org.w3c.dom.Document w3cDoc = parser.getDocument();
       
        DOMReader xmlReader = new DOMReader();
        return xmlReader.read(w3cDoc);
       
    }
View Full Code Here

Examples of org.dom4j.io.DOMReader

                tidy.setXmlOut(true);
                tidy.setErrout(new PrintWriter(new ByteArrayOutputStream()));

                org.w3c.dom.Document dom = tidy.parseDOM(resource.getInputStream(), null);

                return new DOMReader().read(dom);
            } catch (Exception e) {
            }
        }

        return null;
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.record.DOMReader

            return;
        }

        try {
            Document xmlDocument = objectToXML(object, xmlDescriptor, isXMLRoot);
            DOMReader reader = new DOMReader();
            reader.setProperty("http://xml.org/sax/properties/lexical-handler", lexicalHandler);
            if (isFragment()) {
                FragmentContentHandler fragmentHandler = new FragmentContentHandler(contentHandler);
                reader.setContentHandler(fragmentHandler);
            } else {
                reader.setContentHandler(contentHandler);
            }
            reader.parse(xmlDocument);
        } catch (XMLPlatformException e) {
            throw XMLMarshalException.marshalException(e);
        } catch (org.xml.sax.SAXNotRecognizedException e) {
            //won't be thrown
        } catch (SAXNotSupportedException e) {
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.