Build XML list tag determined by fullname status and ending class phrase

@return XML list tag
@see #exportClassEnding
@see #exportClassFullName
540333
private <T> String buildClassListTag(final T t) {
        return (exportClassFullName != null)
                ? exportClassFullName
                : t.getClass().getSimpleName() + exportClassEnding;
    }
963687
private TagList createTagList(ObjectName name) {
    Map<String, String> props = name.getKeyPropertyList();
    SmallTagMap.Builder tagsBuilder = SmallTagMap.builder();
    for (Map.Entry<String, String> e : props.entrySet()) {
      String key = PROP_KEY_PREFIX + "." + e.getKey();
      tagsBuilder.add(Tags.newTag(key, e.getValue()));
    }
    tagsBuilder.add(Tags.newTag(DOMAIN_KEY, name.getDomain()));
    tagsBuilder.add(CLASS_TAG);
    if (defaultTags != null) {
      defaultTags.forEach(tagsBuilder::add);
    }
    return new BasicTagList(tagsBuilder.result());
  }
1019157
@Override
    public XmlStringBuilder toXML() {
        XmlStringBuilder buf = new XmlStringBuilder();
        buf.halfOpenElement(ELEMENT).xmlnsAttribute(NAMESPACE).rightAngleBracket();

        for (BookmarkedURL urlStorage : getBookmarkedURLS()) {
            if (urlStorage.isShared()) {
                continue;
            }
            buf.halfOpenElement("url").attribute("name", urlStorage.getName()).attribute("url", urlStorage.getURL());
            buf.condAttribute(urlStorage.isRss(), "rss", "true");
            buf.closeEmptyElement();
        }

        // Add Conference additions
        for (BookmarkedConference conference : getBookmarkedConferences()) {
            if (conference.isShared()) {
                continue;
            }
            buf.halfOpenElement("conference");
            buf.attribute("name", conference.getName());
            buf.attribute("autojoin", Boolean.toString(conference.isAutoJoin()));
            buf.attribute("jid", conference.getJid());
            buf.rightAngleBracket();

            buf.optElement("nick", conference.getNickname());
            buf.optElement("password", conference.getPassword());

            buf.closeElement("conference");
        }

        buf.closeElement(ELEMENT);
        return buf;
    }
253833
private StringBuilder getXSLTBase() {
        StringBuilder result = new StringBuilder(XML_DECLARATION)
            .append(XMLUnit.getXSLTStart());
        String tmp = result.toString();
        int close = tmp.lastIndexOf('>');
        if (close == -1) {
            close = tmp.length();
        }
        result.insert(close, getNamespaceDeclarations());
        return result;
    }
429429
public String getXML()
    {
        Object root = null;
        if (m_message != null)
            root = m_message.getRawData();
        if (root != null)
        {
            try {
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                String strSOAPPackage = (String)((TrxMessageHeader)this.getMessage().getMessageHeader()).get(SOAPMessageTransport.SOAP_PACKAGE);
    
                Marshaller m = JaxbContexts.getJAXBContexts().getMarshaller(strSOAPPackage);
                if (m == null)
                    return null;
                synchronized(m)
                {   // Since the marshaller is shared (may want to tweek this for multi-cpu implementations)
                    m.marshal( root, out );
                }
                String strXML = out.toString(Constants.STRING_ENCODING);
                return strXML;
            } catch (IOException ex)  {
                ex.printStackTrace();   // Never
            } catch (JAXBException ex)   {
                ex.printStackTrace();
            } catch (java.lang.IllegalArgumentException ex)   {
                ex.printStackTrace();
            }
        }
        return null;
    }
944027
public function xml()
    {
        foreach ($this->_result as $disk_items) {
            if (isset($disk_items['Name']) && (trim($disk_items['Name']) !== '')) {
                $xmlstablebit_disk = $this->xml->addChild("Disk");
                foreach ($this->stablebit_items as $item) {
                    if (isset($disk_items[$item]) && (($itemvalue=$disk_items[$item]) !== '') &&
                    (($item !== 'SerialNumber') || (defined('PSI_PLUGIN_STABLEBIT_SHOW_SERIAL') && (PSI_PLUGIN_STABLEBIT_SHOW_SERIAL === true)))) {
                        $xmlstablebit_disk ->addAttribute($item, $itemvalue);
                    }
                }
            }
        }

        return $this->xml->getSimpleXmlElement();
    }
1197934
public String buildLanguageList() {

        try {
            StringBuffer retValue = new StringBuffer(512);
            retValue.append("<table border=\"0\">\n");

            // get locale for current element
            Locale elLocale = getElementLocale();

            // get locale names based on properties and global settings
            List<Locale> localeList = OpenCms.getLocaleManager().getAvailableLocales(getCms(), getParamTempfile());

            // read xml content for checking locale availability
            CmsFile file = getCms().readFile(getParamTempfile(), CmsResourceFilter.IGNORE_EXPIRATION);
            CmsXmlContent content = CmsXmlContentFactory.unmarshal(getCms(), file);

            // show all possible elements
            Iterator<Locale> i = localeList.iterator();
            while (i.hasNext()) {
                // get the current list element
                Locale curLocale = i.next();

                // skip locale of current element
                if (elLocale.equals(curLocale)) {
                    continue;
                }

                // build an element row
                retValue.append("<tr>\n");
                retValue.append("\t<td class=\"textcenter\" unselectable=\"on\"><input type=\"checkbox\" name=\"");
                retValue.append(PARAM_LANGUAGE);
                retValue.append("\" value=\"");
                retValue.append(curLocale.toString());
                retValue.append("\">");
                retValue.append("</td>\n");
                retValue.append("\t<td style=\"white-space: nowrap;\" unselectable=\"on\">");
                retValue.append(curLocale.getDisplayName(getLocale()));
                retValue.append(!content.hasLocale(curLocale) ? " [-]" : "");
                retValue.append("</td>\n");
                retValue.append("\t<td style=\"white-space: nowrap;\" unselectable=\"on\">");
                retValue.append(
                    !content.hasLocale(curLocale)
                    ? Messages.get().getBundle(getLocale()).key(Messages.GUI_EDITOR_DIALOG_COPYLANGUAGE_NEW_0)
                    : "");
                retValue.append("</td>\n");

                retValue.append("</tr>\n");
            }

            retValue.append("</table>\n");
            return retValue.toString();

        } catch (Throwable e) {
            // should usually never happen
            if (LOG.isInfoEnabled()) {
                LOG.info(e);
            }
            return "";
        }
    }
1289113
public String toXML() {
        StringBuilder buf = new StringBuilder();
        buf.append("<item");
        if (this.isAllow()) {
        	buf.append(" action=\"allow\"");
        } else {
        	buf.append(" action=\"deny\"");
        }
        buf.append(" order=\"").append(getOrder()).append('"');
        if (getType() != null) {
            buf.append(" type=\"").append(getType()).append('"');
        }
        if (getValue() != null) {
            buf.append(" value=\"").append(getValue()).append('"');
        }
        if (isFilterEverything()) {
        	buf.append("/>");
        } else {
        	buf.append('>');
        	if (this.isFilterIQ()) {
            	buf.append("<iq/>");
            }
        	if (this.isFilterMessage()) {
            	buf.append("<message/>");
            }
        	if (this.isFilterPresenceIn()) {
            	buf.append("<presence-in/>");
            }
        	if (this.isFilterPresenceOut()) {
            	buf.append("<presence-out/>");
            }
        	buf.append("</item>");
        }
        // CHECKSTYLE:ON
        return buf.toString();
    }
54749
public String getXml() {
        try {
            return ((ByteArrayOutputStream) outputStream).toString(StandardCharsets.UTF_8.name());
        } catch (UnsupportedEncodingException e) {
            return outputStream.toString();
        }
    }
898961
public String asTagsString()
    {
        TreeMap<Tag, Value> orderedAttributes = new TreeMap<Tag, Value>(attributes);
        StringBuilder result = new StringBuilder();
        for (Iterator<Tag> tags = orderedAttributes.keySet().iterator(); tags.hasNext(); )
        {
            Tag tag = tags.next();
            result.append(tag.tag);
            if (tags.hasNext()) result.append(",");
        }
        return result.toString();
    }
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();
    }
121352
protected static String generateTag() {
		StackTraceElement[] elements = Thread.currentThread().getStackTrace();

		String currentPath = elements[4].getClassName();
		String method = elements[4].getMethodName();
		int line = elements[4].getLineNumber();

		String tag = currentPath + ", " + method + " (line " + line + ")";
		tag = tag.substring(tag.lastIndexOf(".") + 1);

		return tag;
	}
861650
function xmlString( )
    {
        $doc = new DOMDocument( '1.0', 'utf-8' );

        $root = $doc->createElement( "ezrangeoption" );
        $root->setAttribute( "start_value", $this->StartValue );
        $root->setAttribute( "stop_value", $this->StopValue );
        $root->setAttribute( "step_value", $this->StepValue );
        $doc->appendChild( $root );

        $name = $doc->createElement( "name", $this->Name );
        $root->appendChild( $name );

        $xml = $doc->saveXML();

        return $xml;
    }
791059
protected function _toXMLFragment() 
    {
        $xml = "";
        foreach ($this->_fields as $fieldName => $field) {
            $fieldValue = $field['FieldValue'];
            if (!is_null($fieldValue)) {
                $fieldType = $field['FieldType'];
                if (is_array($fieldType)) {
                    if ($this->_isComplexType($fieldType[0])) {
                        foreach ($fieldValue as $item) {
                            $xml .= "<$fieldName>";
                            $xml .= $item->_toXMLFragment();
                            $xml .= "</$fieldName>";
                        }
                    } else {
                        foreach ($fieldValue as $item) {
                            $xml .= "<$fieldName>";
                            $xml .= $this->_escapeXML($item);
                            $xml .= "</$fieldName>";
                        }
                    }
                } else {
                    if ($this->_isComplexType($fieldType)) {
                        $xml .= "<$fieldName>";
                        $xml .= $fieldValue->_toXMLFragment();
                        $xml .= "</$fieldName>";
                    } else {
                        $xml .= "<$fieldName>";
                        $xml .= $this->_escapeXML($fieldValue);
                        $xml .= "</$fieldName>";
                    }
                }
            }
        }
        return $xml;
    }
859556
public List<TaglibType<JspConfigType<T>>> getAllTaglib()
   {
      List<TaglibType<JspConfigType<T>>> list = new ArrayList<TaglibType<JspConfigType<T>>>();
      List<Node> nodeList = childNode.get("taglib");
      for(Node node: nodeList)
      {
         TaglibType<JspConfigType<T>>  type = new TaglibTypeImpl<JspConfigType<T>>(this, "taglib", childNode, node);
         list.add(type);
      }
      return list;
   }
1024964
public XMLSerializer endTag(String namespace, String name) throws IOException {
		// check that level is valid
		//// assert namespace != null;
		// if(namespace != null) {
		// namespace = namespace.intern();
		// }
		seenBracket = seenBracketBracket = false;
		if (namespace != null) {
			if (!namesInterned) {
				namespace = namespace.intern();
			} else if (checkNamesInterned) {
				checkInterning(namespace);
			}
		}

		if (namespace != elNamespace[depth]) {
			throw new IllegalArgumentException("expected namespace " + printable(elNamespace[depth]) + " and not " + printable(namespace) + getLocation());
		}
		if (name == null) {
			throw new IllegalArgumentException("end tag name can not be null" + getLocation());
		}
		if (checkNamesInterned && namesInterned) {
			checkInterning(name);
		}
		String startTagName = elName[depth];
		if ((!name.equals(startTagName))) {
			throw new IllegalArgumentException("expected element name " + printable(elName[depth]) + " and not " + printable(name) + getLocation());
		}
		if (startTagIncomplete) {
			writeNamespaceDeclarations();
			// out.write(" />"); //space is added to make it easier to work in
			// XHTML!!!
			out.write("/>");
			--depth;
		} else {
			// assert startTagIncomplete == false;
			if (doIndent && seenTag) {
				writeIndent();
			}
			out.write("</");
			String startTagPrefix = elPrefix[depth];
			if (startTagPrefix.length() > 0) {
				out.write(startTagPrefix);
				out.write(':');
			}

			// if(namespace != null && namespace.length() > 0) {
			// //TODO prefix should be alredy known from matching start tag ...
			// final String prefix = lookupOrDeclarePrefix( namespace );
			// //assert( prefix != null);
			// if(prefix.length() > 0) {
			// out.write(prefix);
			// out.write(':');
			// }
			// }
			out.write(name);
			out.write('>');
			--depth;
		}
		namespaceEnd = elNamespaceCount[depth];
		startTagIncomplete = false;
		seenTag = true;
		return this;
	}
777426
def to_xml
      xml = Builder::XmlMarkup.new
      case
      when @self_closing && @content_type == 'container'
        xml.tag!(@name, @attributes)
      when @value.nil?
        xml.tag!(@name, @attributes.merge!("xsi:nil" => "true"))
      when ::Hash === @value
        xml.tag!(@name, @attributes) { xml << XmlFu::Hash.to_xml(@value) }
      when ::Array === @value
        case @content_type
        when "collection"
          xml << XmlFu::Array.to_xml(@value.flatten, {
            :key => (@self_closing ? "#{@name}/" : @name),
            :attributes => @attributes,
            :content_type => "collection"
          })
        when "container"
          xml.tag!(@name, @attributes) { xml << XmlFu::Array.to_xml(@value) }
        else
          # Shouldn't be anything else
        end
      else
        xml.tag!(@name, @attributes) { xml << self.value.to_s }
      end
      xml.target!
    end