Package org.jdom.output

Examples of org.jdom.output.XMLOutputter.outputString()


  **/
  public boolean publishMessage(ActionableEnterpriseObject theObject, Document doc)
  throws TransportException {
    TextMessage outMessage = createTextMessage();
    XMLOutputter xmlOut = new XMLOutputter();
    String messageBody = xmlOut.outputString(doc);
    String xmlMsgId = theObject.getMessageId().toString();
    logger.debug("PubSubProducer: ProducerId is: " + getProducerId(null).getId());
    logger.debug("PubSubProducer: MessageId is: " + xmlMsgId);

    try {
View Full Code Here


        getBaseline().buildObjectFromInput(oldBaselineElement);
      }
      catch (Exception e) {
        logger.fatal("Error building baseline object from element for object (baseline/clone) " +
          getBaseline().getClass().getName() + " content of element: " +
          xmlOut.outputString(oldBaselineElement));
        String errMessage = "Error building baseline object from element for object " +
          getClass().getName() + "  Exception: " + e.getMessage();
        throw new EnterpriseObjectUpdateException(errMessage, e);
      }
    }
View Full Code Here

  //============================================================================
  private void outputXMLDocument(Document doc, String message) {
    try {
      XMLOutputter fmt = new XMLOutputter(Format.getPrettyFormat());
      logger.fatal(message);
      logger.fatal("\n" + fmt.outputString(doc));
    }
    catch (Exception exc) {
      logger.fatal("Error converting XML Document to String.");
      logger.fatal(exc.getMessage(), exc);
    }
View Full Code Here

  //============================================================================
  private void outputXMLElement(Element element, String message) {
    try {
      XMLOutputter fmt = new XMLOutputter(Format.getPrettyFormat());
      logger.fatal(message);
      logger.fatal("\n" + fmt.outputString(element));
    }
    catch (Exception exc) {
      logger.fatal("Error converting XML Element to String.");
      logger.fatal(exc.getMessage(), exc);
    }
View Full Code Here

  this will be a 'String' object built from the message body of the JMS message passed in.
  *  @return  String
  */
  public final String getMessageBody(Document inDoc) {
    XMLOutputter xmlOut = new XMLOutputter();
    return xmlOut.outputString(inDoc);
  }

/**
  *  Set AppConfig associated to this command.  It is called in the
  *  constructor of Command.
View Full Code Here

            throw new JMSException(ele1.getMessage());
          }
          controlArea.addContent(eResult);

          XMLOutputter xOut = new XMLOutputter();
          return xOut.outputString(errorDoc);
        }
        else {
          return null;
        }
      }
View Full Code Here

        throw new JMSException(ele1.getMessage());
      }
      controlArea.addContent(eResult);

      XMLOutputter xOut = new XMLOutputter();
      return xOut.outputString(errorDoc);
    }
    return null;
  }

  /**
 
View Full Code Here

      eControlArea.addContent(eResult);
      syncErrorDoc.getRootElement().removeContent(eControlArea);
      syncErrorDoc.getRootElement().addContent(eControlArea);
      TextMessage syncErrorMessage = getSyncErrorPublisher().createTextMessage();
      XMLOutputter xmlOut = new XMLOutputter();
      syncErrorMessage.setText(xmlOut.outputString(syncErrorDoc));
      if (getSyncErrorPublisher().getDefaultCommandName().length() == 0 ||
        getSyncErrorPublisher().getDefaultCommandName() == null) {
        getSyncErrorPublisher().setDefaultCommandName("EnterpriseSyncErrorSync");
      }
      syncErrorMessage.setStringProperty(MessageProducer.MESSAGE_ID,msgId.toString());
View Full Code Here

  /** Write the information as an XML document
   * @return String contining netcdfDatasetInfo XML
   */
  public String writeXML( )  {
    XMLOutputter fmt = new XMLOutputter( Format.getPrettyFormat());
    return fmt.outputString( makeDocument());
  }

  public GridCoordSys getGridCoordSys(VariableEnhanced ve) {
    List<CoordinateSystem> csList = ve.getCoordinateSystems();
    for (CoordinateSystem cs : csList) {
View Full Code Here

    }
    if (debugXML) System.out.println(" SAXBuilder done");

    if (showParsedXML) {
      XMLOutputter xmlOut = new XMLOutputter();
      System.out.println("*** NetcdfDataset/showParsedXML = \n" + xmlOut.outputString(doc) + "\n*******");
    }

    Element netcdfElem = doc.getRootElement();
    Namespace use = netcdfElem.getNamespace(); // detect incorrect namespace
    if (!use.equals(ncNS)) {
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.