Package org.jdom.input

Examples of org.jdom.input.DOMBuilder


        } catch (SAXException e) {
            LOG.error("Error parsing Aegis file.", e); // can't happen due to
                                                        // above.
            return null;
        }
        return new DOMBuilder().build(doc);
    }
View Full Code Here


      throw new RuntimeException(e1);
    }
  }

  public static Element convertFromDOM(org.w3c.dom.Element e) {
    return new DOMBuilder().build(e);
  }
View Full Code Here

        Node node = xml.getWrappedNode();
        Document document = (Document)node; // assume that we're given the
        // entire document.
        // if that's an issue, we could code something more complex.
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        org.jdom.Document jDocument = new DOMBuilder().build(document);
        org.jdom.output.Format format = org.jdom.output.Format.getRawFormat();
        format.setEncoding("utf-8");
        try {
            new XMLOutputter(format).output(jDocument, baos);
        } catch (IOException e) {
View Full Code Here

     * @throws IllegalArgumentException thrown if feed type could not be understood by any of the underlying parsers.
     * @throws FeedException if the feed could not be parsed
     *
     */
    public WireFeed build(org.w3c.dom.Document document) throws IllegalArgumentException,FeedException {
        DOMBuilder domBuilder = new DOMBuilder();       
        try {
            Document jdomDoc = domBuilder.build(document);
            return build(jdomDoc);
        }
        catch (IllegalArgumentException ex) {
            throw ex;
        }
View Full Code Here

        } catch (SAXException e) {
            LOG.log(Level.SEVERE, "Error parsing Aegis file.", e); // can't happen due to
                                                        // above.
            return null;
        }
        return new DOMBuilder().build(doc);
    }
View Full Code Here

        Node node = xml.getWrappedNode();
        Document document = (Document)node; // assume that we're given the
        // entire document.
        // if that's an issue, we could code something more complex.
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        org.jdom.Document jDocument = new DOMBuilder().build(document);
        org.jdom.output.Format format = org.jdom.output.Format.getRawFormat();
        format.setEncoding("utf-8");
        try {
            new XMLOutputter(format).output(jDocument, baos);
        } catch (IOException e) {
View Full Code Here

      throw new RuntimeException(e1);
    }
  }

  public static Element convertFromDOM(org.w3c.dom.Element e) {
    return new DOMBuilder().build(e);
  }
View Full Code Here

            {
                types = getDefinition().createTypes();
                getDefinition().setTypes(types);
            }
           
            DOMBuilder domBuilder = new DOMBuilder();
           
            for (DOMResult result : results)
            {
                Element schema = domBuilder.build(((Document)result.getNode()).getDocumentElement());
               
                // JAXB doesn't accept a Result with a null SystemId, which
                // means it generats import statements for us. However, they're
                // worthless imports as they contain the schemaLocation. So
                // lets remove it.
View Full Code Here

     * Note: Mixed content (text and xml together) will not be returned
     * accurately.
     */
    public String getPropertyAsString() {
      StringBuffer text = new StringBuffer();
        DOMBuilder builder = new DOMBuilder();
        XMLOutputter outputter = new XMLOutputter( Format.getPrettyFormat() );
        org.jdom.Element e = builder.build( element );
        List children = e.getChildren();
        if ( children.size() > 0 ) {
          text.append( outputter.outputString( children ) );
        }
        text.append( e.getTextTrim() );
View Full Code Here

     *
     * @param e the e
     * @return the element
     */
    private static Element toJdom(final org.w3c.dom.Element e) {
        return  new DOMBuilder().build(e);
    }
View Full Code Here

TOP

Related Classes of org.jdom.input.DOMBuilder

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.