Package org.jdom.output

Examples of org.jdom.output.SAXOutputter.output()


        // ensures that the tracker receives all startElement and endElement
        // events. In addition, it also checks that the trackers current
        // xpath matches an expected xpath.
        outputter.setContentHandler(new XPathTrackerFeeder(tracker));
        // output the document
        outputter.output(document);

    }


    /**
 
View Full Code Here


  try {
      SAXOutputter outputter = new SAXOutputter();
      procDef = new SAXEventBufferImpl ();
      outputter.setContentHandler(procDef);
      outputter.setLexicalHandler(procDef);
      outputter.output (processDefinition);
  } catch (JDOMException e) {
      String s = "Cannot get XPDL from DOM: " + e.getMessage();
      logger.error (s, e);
      throw new IllegalArgumentException (s);
  }
View Full Code Here

    private void subtreeToSAX (Element e, ContentHandler h) {
  try {
      SAXEventBufferImpl buf = new SAXEventBufferImpl ();
      SAXOutputter out = new SAXOutputter (buf);
      out.output(new Document((Element)e.clone()));
      HandlerStack hs = new HandlerStack (h);
      buf.emit (hs.contentHandler());
  } catch (JDOMException ex) {
      throw new IllegalArgumentException (ex.getMessage ());
  } catch (SAXException ex) {
View Full Code Here

        SAXOutputter outputter = new SAXOutputter();
        SAXEventBufferImpl b = new SAXEventBufferImpl ();
        outputter.setContentHandler(b);
        outputter.setLexicalHandler(b);
        if (v instanceof Document) {
      outputter.output ((Document)v);
        } else {
      List l;
      if (v instanceof List) {
          l = (List)v;
      } else {
View Full Code Here

          l = (List)v;
      } else {
          l = new ArrayList ();
          l.add (v);
      }
      outputter.output (l);
        }
        b.pack();
        v = b;
        newValues.put (name, v);
    } catch (JDOMException e) {
View Full Code Here

      @SuppressWarnings("unchecked")
      // This cast is correct
      List<Element> children = root.getChildren();
      for (Element child : children) {
        outputter.output(child);
      }

    } catch (JDOMException e) {
                        //If we are here, then a parsing error occurred within the XHTML fragment.  We'll just assume
                        // that this is not supposed to be XHTML and display the fragment as plain text within <dri:p> tags.
View Full Code Here

    vh.setErrorHandler(eh);

    SAXOutputter so = new SAXOutputter(vh);
    eh.setSo(so);

    so.output(xml);
  }

  private static SchemaFactory factory() {
    return SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
  }
View Full Code Here

                filter.allowElements().allowIgnorableWhitespace().allowCharacters().allowCDATA().allowPrefixMappings();

                SAXOutputter outputter = new SAXOutputter();
                outputter.setContentHandler(filter);
                outputter.setLexicalHandler(filter);
                outputter.output(dissemination);
            } catch (JDOMException jdome) {
                throw new WingException(jdome);
            } catch (AuthorizeException ae) {
                // just ignore the authorize exception and continue on with
                //out parsing the xml document.
View Full Code Here

            filter.allowElements().allowIgnorableWhitespace().allowCharacters().allowCDATA().allowPrefixMappings();

            SAXOutputter outputter = new SAXOutputter();
            outputter.setContentHandler(filter);
            outputter.setLexicalHandler(filter);
            outputter.output(dissemination);
        } catch (JDOMException jdome) {
            throw new WingException(jdome);
        } catch (AuthorizeException ae) {
            // just ignore the authorize exception and continue on with
            //out parsing the xml document.
View Full Code Here

                        filter.allowElements().allowIgnorableWhitespace().allowCharacters().allowCDATA().allowPrefixMappings();
                       
                    SAXOutputter outputter = new SAXOutputter();
                    outputter.setContentHandler(filter);
                    outputter.setLexicalHandler(filter);
                                outputter.output(dissemination);
                        }
            catch (JDOMException jdome)
                        {
                                throw new WingException(jdome);
                        }
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.