Set the message data as a XML String.
@return
197304
public boolean setXML(String strXML)
    {
        Document doc = Util.convertXMLToDOM(strXML);
        return this.setDOM(doc);
    }
558505
@Route(method= HttpMethod.GET, uri="/", produces = "application/xml")
    public Result asXML() {
        return ok(map).xml();
    }
1171919
def toxml(self):
        

        xmlstr = '<OnEvent port="{0}"'.format(self.port)

        chxmlstr = ''

        for action in self.actions:
            chxmlstr += action.toxml()

        if chxmlstr:
            xmlstr += '>' + chxmlstr + '</OnEvent>'
        else:
            xmlstr += '/>'

        return xmlstr
1248915
public XMLString xstr()
  {
    int node = item(0);
    return (node != DTM.NULL) ? getStringFromNode(node) : XString.EMPTYSTRING;
  }
54749
public String getXml() {
        try {
            return ((ByteArrayOutputStream) outputStream).toString(StandardCharsets.UTF_8.name());
        } catch (UnsupportedEncodingException e) {
            return outputStream.toString();
        }
    }
1335374
def to_xml_string(str="")
      str << ('<c:' << tag_name.to_s << '>')
      if @f
        str << ('<c:' << @ref_tag_name.to_s << '>')
        str << ('<c:f>' << @f.to_s << '</c:f>')
      end
      @data.to_xml_string str
      if @f
        str << ('</c:' << @ref_tag_name.to_s << '>')
      end
      str << ('</c:' << tag_name.to_s << '>')
    end
944903
public String toXML()
    {
        RepositoryTags tags = RepositoryTags.getInstance();
        String eol = SystemUtils.LINE_SEPARATOR;

        // write opening tag
        String result = "      " + tags.getOpeningTagNonClosingById(COLLECTION_DESCRIPTOR) + eol;

        // write attributes
        // name
        result       += "        " + tags.getAttribute(FIELD_NAME,this.getAttributeName()) + eol;

        // collection class is optional
        if (getCollectionClassName() != null)
        {
            result       += "        " + tags.getAttribute(COLLECTION_CLASS,this.getCollectionClassName()) + eol;
        }

        // element-class-ref
         result       += "        " + tags.getAttribute(ITEMS_CLASS,this.getItemClassName()) + eol;

        // indirection-table is optional
        if (isMtoNRelation())
        {
             result += "        " + tags.getAttribute(INDIRECTION_TABLE,getIndirectionTable()) + eol;
        }

        // proxyReference is optional, disabled by default
        if (isLazy())
        {
            result       += "        " + tags.getAttribute(PROXY_REFERENCE,"true") + eol;
            result       += "        " + tags.getAttribute(PROXY_PREFETCHING_LIMIT, "" + this.getProxyPrefetchingLimit()) + eol;
        }

        //reference refresh is optional, disabled by default
        if (isRefresh())
        {
             result       += "        " + tags.getAttribute(REFRESH,"true") + eol;
        }

        //auto retrieve
        result += "        " + tags.getAttribute(AUTO_RETRIEVE, "" + getCascadeRetrieve()) + eol;

        //auto update
        result += "        " + tags.getAttribute(AUTO_UPDATE, getCascadeAsString(getCascadingStore())) + eol;

        //auto delete
        result += "        " + tags.getAttribute(AUTO_DELETE, getCascadeAsString(getCascadingDelete())) + eol;

        //otm-dependent is optional, disabled by default
        if (getOtmDependent())
        {
            result += "        " + tags.getAttribute(OTM_DEPENDENT, "true") + eol;
        }

        // close opening tag
        result       += "      >" + eol;

        // write elements
         // inverse fk elements
        for (int i=0;i<getForeignKeyFields().size();i++)
        {
        Object obj = getForeignKeyFields().get(i);
        if (obj instanceof Integer)
        {
                String fkId = obj.toString();
            result += "        " + tags.getOpeningTagNonClosingById(INVERSE_FK) + " ";
                result += tags.getAttribute(FIELD_ID_REF, fkId) + "/>" + eol;
        }
        else
        {
                String fk = (String) obj;
            result += "        " + tags.getOpeningTagNonClosingById(INVERSE_FK) + " ";
                result += tags.getAttribute(FIELD_REF, fk) + "/>" + eol;
        }
        }

        // write optional M:N elements
        // m:n relationship settings, optional
        if (isMtoNRelation())
        {
            // foreign keys to this class
             for (int i=0;i<getFksToThisClass().length;i++)
             {
                String fkId = getFksToThisClass()[i];
                result += "        " + tags.getOpeningTagNonClosingById(FK_POINTING_TO_THIS_CLASS) + " ";
                result += tags.getAttribute(COLUMN_NAME, fkId) + "/>" + eol;
             }

            // foreign keys to item class
             for (int i=0;i<getFksToItemClass().length;i++)
             {
                String fkId = getFksToItemClass()[i];
                result += "        " + tags.getOpeningTagNonClosingById(FK_POINTING_TO_ITEMS_CLASS) + " ";
                result += tags.getAttribute(COLUMN_NAME, fkId) + "/>" + eol;
             }
        }

        // closing tag
        result       += "      " + tags.getClosingTagById(COLLECTION_DESCRIPTOR) + eol;
        return result;
    }
854040
public function xml()
    {
        foreach ($this->_result as $printer=>$markersupplies_item) {
            $xmlsnmppinfo_printer = $this->xml->addChild("Printer");
            $xmlsnmppinfo_printer->addAttribute("Device", $printer);
            if (isset($markersupplies_item[1]) &&
                isset($markersupplies_item[1]['prtMarkerSuppliesDescriptionRicoh']) &&
                isset($markersupplies_item[1]['prtMarkerSuppliesLevelRicoh'])) {
                $ricoh = true;
            } else {
                $ricoh = false;
            }

            foreach ($markersupplies_item as $marker=>$snmppinfo_item) {
                if ($marker==0) {
                    $xmlsnmppinfo_printer->addAttribute("Name", $snmppinfo_item['prtMarkerSuppliesDescription']);
                } elseif ($marker==99) {
                    foreach ($snmppinfo_item as $item=>$iarr) {
                        if (isset($iarr["message"]) && $iarr["message"] != "") {
                            $xmlsnmppinfo_errors = $xmlsnmppinfo_printer->addChild("PrinterMessage");
                            $xmlsnmppinfo_errors->addAttribute("Message", $iarr["message"]);
                            $xmlsnmppinfo_errors->addAttribute("Severity", $iarr["severity"]);
                        }
                    }
                } else {
                    if ($ricoh) {
                        if (isset($snmppinfo_item['prtMarkerSuppliesDescriptionRicoh'])) {
                            $xmlsnmppinfo = $xmlsnmppinfo_printer->addChild("MarkerSupplies");

                            $xmlsnmppinfo->addAttribute("Description", $snmppinfo_item['prtMarkerSuppliesDescriptionRicoh']);
                            $xmlsnmppinfo->addAttribute("SupplyUnit", "19");
                            $xmlsnmppinfo->addAttribute("MaxCapacity", "100");
                            $xmlsnmppinfo->addAttribute("Level", isset($snmppinfo_item['prtMarkerSuppliesLevelRicoh']) ? $snmppinfo_item['prtMarkerSuppliesLevelRicoh'] : "");
                        }
                    } else {
                        $xmlsnmppinfo = $xmlsnmppinfo_printer->addChild("MarkerSupplies");

                        $xmlsnmppinfo->addAttribute("Description", isset($snmppinfo_item['prtMarkerSuppliesDescription']) ? $snmppinfo_item['prtMarkerSuppliesDescription'] : "");
                        $xmlsnmppinfo->addAttribute("SupplyUnit", isset($snmppinfo_item['prtMarkerSuppliesSupplyUnit']) ? $snmppinfo_item['prtMarkerSuppliesSupplyUnit'] : "");
                        $xmlsnmppinfo->addAttribute("MaxCapacity", isset($snmppinfo_item['prtMarkerSuppliesMaxCapacity']) ? $snmppinfo_item['prtMarkerSuppliesMaxCapacity'] : "");
                        $xmlsnmppinfo->addAttribute("Level", isset($snmppinfo_item['prtMarkerSuppliesLevel']) ? $snmppinfo_item['prtMarkerSuppliesLevel'] : "");
                    }
                }
            }
        }

        return $this->xml->getSimpleXmlElement();
    }
79176
public String toHtml() {
        StringBuilder stringBuilder = new StringBuilder();

        stringBuilder
                .append("<p>")
                .append(objectNode.get(TYPE).asText()).append(": ")
                .append(objectNode.get(MESSAGE).asText()).append(" -> ")
                .append(objectNode.get(DETAILS).toString())
                .append("</p>");

        return stringBuilder.toString();
    }
1189040
public String toXML() {
        String xml = MARSHALLER.toXML(this);
        return KMODULE_XSD + xml.substring("<kmodule".length());  // 
    }
111621
public static String messagesToString(final Set<String> messages) {
    final SafeHtmlBuilder sb = new SafeHtmlBuilder();
    for (final String message : messages) {
      sb.appendEscaped(message);
      sb.appendEscaped("\n");
    }
    return sb.toSafeHtml().asString();
  }
1219972
public String toXmlString() throws TransformerException {
        if (doc == null) {
            return null;
        }
        final DOMSource domSource = new DOMSource(doc);
        final StringWriter writer = new StringWriter();
        final StreamResult result = new StreamResult(writer);
        final TransformerFactory tf = TransformerFactory.newInstance();
        tf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
        final Transformer transformer = tf.newTransformer();
        transformer.setOutputProperty(OutputKeys.ENCODING, StandardCharsets.UTF_8.name());
        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
        transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, "yes");
        transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
        transformer.transform(domSource, result);

        return writer.toString();
    }
119674
private ContentType getContentType() {
        String contentTypeValue = m_request.getContentType();
        if (contentTypeValue == null) {
            return ContentType.TEXT_XML;
        }
        return new ContentType(contentTypeValue);
    }
933799
public String build()
    {
        this.message_string  = "{";

        if( this.recipient_id != null ){
            this.message_string += "\"recipient\": {\"id\": \"" + this.recipient_id + "\"},";
        }

        if( !this.elements.isEmpty() ){

            this.message_string += "\"message\": {";

                this.message_string += "\"attachment\": {";

                    this.message_string += "\"type\": \"template\",";

                    this.message_string += "\"payload\": {";

                        if( this.element_style.equals("compact") ){
                            this.message_string += "\"top_element_style\":\"" + this.element_style + "\",";
                        }

                        if( !this.elements.isEmpty() ){

                            this.message_string += "\"elements\":[";
                            for ( int j = 0 ; j < this.elements.size(); j++ ) {
                                HashMap<String, Object> element = this.elements.get(j);

                                this.message_string += "{";
                                if( !element.get("title").equals("") ){
                                    this.message_string += "\"title\":\"" + element.get("title") + "\",";
                                }
                                if( !element.get("image_url").equals("") ){
                                    this.message_string += "\"image_url\":\"" + element.get("image_url") + "\",";
                                }
                                if( !element.get("subtitle").equals("") ){
                                    this.message_string += "\"subtitle\":\"" + element.get("subtitle") + "\",";
                                }

                                if( !element.get("default_action_type").equals("") || !element.get("default_action_url").equals("") || !element.get("default_action_messenger_extensions").equals("") || !element.get("default_action_webview_height_ratio").equals("") || !element.get("default_action_fallback_url").equals("") ){
                                    this.message_string += "\"default_action\":{";
                                        if( !element.get("default_action_type").equals("") ){
                                            this.message_string += "\"type\":\"" + element.get("default_action_type") + "\",";
                                        }
                                        if( !element.get("default_action_url").equals("") ){
                                            this.message_string += "\"url\":\"" + element.get("default_action_url") + "\",";
                                        }
                                        if( !element.get("default_action_messenger_extensions").equals("") ){
                                            this.message_string += "\"messenger_extensions\":\"" + element.get("default_action_messenger_extensions") + "\",";
                                        }
                                        if( !element.get("default_action_webview_height_ratio").equals("") ){
                                            this.message_string += "\"webview_height_ratio\":\"" + element.get("default_action_webview_height_ratio") + "\",";
                                        }
                                        if( !element.get("default_action_fallback_url").equals("") ){
                                            this.message_string += "\"fallback_url\":\"" + element.get("default_action_fallback_url") + "\",";
                                        }
                                        this.message_string = this.message_string.replaceAll(",$", "");
                                    this.message_string += "},";
                                }


                                if( element.containsKey("buttons") ){
                                    ArrayList<HashMap<String, String>> buttons = (ArrayList<HashMap<String, String>>) element.get("buttons");
                                    if( !buttons.isEmpty() ){

                                        this.message_string += "\"buttons\": [";

                                            for ( int k = 0 ; k < buttons.size(); k++ ) {
                                                HashMap<String, String> button = buttons.get(k);
                                                this.message_string += "{";
                                                    if( !button.get("title").equals("") ){
                                                        this.message_string += "\"title\":\"" + button.get("title") + "\",";
                                                    }
                                                    if( !button.get("type").equals("") ){
                                                        this.message_string += "\"type\":\"" + button.get("type") + "\",";
                                                    }
                                                    if( !button.get("url").equals("") ){
                                                        this.message_string += "\"url\":\"" + button.get("url") + "\",";
                                                    }
                                                    if( !button.get("messenger_extensions").equals("") ){
                                                        this.message_string += "\"messenger_extensions\":\"" + button.get("messenger_extensions") + "\",";
                                                    }
                                                    if( !button.get("webview_height_ratio").equals("") ){
                                                        this.message_string += "\"webview_height_ratio\":\"" + button.get("webview_height_ratio") + "\",";
                                                    }
                                                    if( !button.get("fallback_url").equals("") ){
                                                        this.message_string += "\"fallback_url\":\"" + button.get("fallback_url") + "\",";
                                                    }
                                                this.message_string = this.message_string.replaceAll(",$", "");
                                                this.message_string += "},";
                                            }

                                            this.message_string = this.message_string.replaceAll(",$", "");
                                        this.message_string += "]";
                                    }
                                }

                                this.message_string = this.message_string.replaceAll(",$", "");
                                this.message_string += "},";
                            }

                            this.message_string = this.message_string.replaceAll(",$", "");
                            this.message_string += "],";
                        }

                        this.message_string += "\"buttons\":[";
                        for ( int j = 0 ; j < this.buttons.size(); j++ ) {
                            HashMap<String, String> button = this.buttons.get(j);

                            this.message_string += "{";
                            if( !button.get("type").equals("") ){
                                this.message_string += "\"type\":\"" + button.get("type") + "\",";
                            }
                            if( !button.get("title").equals("") ){
                                this.message_string += "\"title\":\"" + button.get("title") + "\",";
                            }
                            if( !button.get("url").equals("") ){
                                this.message_string += "\"url\":\"" + button.get("url") + "\",";
                            }
                            if( !button.get("payload").equals("") ){
                                this.message_string += "\"payload\":\"" + button.get("payload") + "\",";
                            }
                            this.message_string = this.message_string.replaceAll(",$", "");
                            this.message_string += "},";
                        }

                        this.message_string = this.message_string.replaceAll(",$", "");
                        this.message_string += "]";

                    this.message_string += "}";

                this.message_string += "}";

            this.message_string += "}";

        }

        this.message_string = this.message_string.replaceAll(",$", "");
        this.message_string += "}";

        return this.message_string;
    }
1218806
function to_xml(){
		if ($this->skip) return "";
		
		$str="<item id='".$this->get_id()."' >";
		for ($i=0; $i<sizeof($this->config->text); $i++){
			$extra = $this->config->text[$i]["name"];
			$str.="<".$extra."><![CDATA[".$this->data[$extra]."]]></".$extra.">";
		}
		return $str."</item>";
	}
730524
@Override
  public String getMessage() {
    StringBuilder sb = new StringBuilder();
    sb.append("Illegal xsd:dateTime format: ");
    sb.append(super.getMessage());
    sb.append(" at index ");
    sb.append(index);
    sb.append(" of '");
    sb.append(input);
    sb.append("'");
    return sb.toString();
  }
920030
def toxml(self):
        

        xmlstr = '<OnStart'

        chxmlstr = ''

        for action in self.actions:
            chxmlstr += action.toxml()

        if chxmlstr:
            xmlstr += '>' + chxmlstr + '</OnStart>'
        else:
            xmlstr += '/>'

        return xmlstr