Generate an XML representation of the given {@link SS_List}.

@param SS_List $set
@return String XML
974520
public function convertDataObjectSet(SS_List $set, $fields = null)
    {
        Controller::curr()->getResponse()->addHeader("Content-Type", "text/xml");
        $className = $this->sanitiseClassName(get_class($set));

        $xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
        $xml .= (is_numeric($this->totalSize)) ? "<$className totalSize=\"{$this->totalSize}\">\n" : "<$className>\n";
        foreach ($set as $item) {
            $xml .= $this->convertDataObjectWithoutHeader($item, $fields);
        }
        $xml .= "</$className>";

        return $xml;
    }
28637
public void setSS(java.util.Collection<String> sS) {
        if (sS == null) {
            this.sS = null;
            return;
        }

        java.util.List<String> sSCopy = new java.util.ArrayList<String>(sS.size());
        sSCopy.addAll(sS);
        this.sS = sSCopy;
    }
1185957
private function strContainsFromCharset($sStr, $sCharset)
    {
        if (empty($this->aCharset[$sCharset])) {
            return true;
        }

        return preg_match('/[' . preg_quote($this->aCharset[$sCharset], '/') . ']/', $sStr);
    }
414310
private void _serializeList(List list, StringBuilder sb, Set<Object> done) throws ConverterException {

	sb.append(goIn());
	sb.append("[");
	boolean doIt = false;
	ListIterator it = list.listIterator();
	while (it.hasNext()) {
	    if (doIt) sb.append(',');
	    doIt = true;
	    _serialize(it.next(), sb, done);
	}

	sb.append(']');
    }
1165491
public Set<String> toStringSet(Set<ModificationFeature> set)
	{
		List<ModificationFeature> list = new ArrayList<ModificationFeature>(set);

		Collections.sort(list, new Comparator<ModificationFeature>()
		{
			@Override
			public int compare(ModificationFeature o1, ModificationFeature o2)
			{
				String t1 = getModificationTerm(o1);
				String t2 = getModificationTerm(o2);

				Integer l1 = getPositionStart(o1);
				Integer l2 = getPositionStart(o2);

				if (t1 == null && t2 == null) return l1.compareTo(l2);
				if (t1 == null) return 1;
				if (t2 == null) return -1;
				if (t1.equals(t2)) return l1.compareTo(l2);
				return t1.compareTo(t2);
			}
		});

		return getInString(list);
	}
1217285
public function mset(array $list)
    {
        return $this->getFactory()->getRedisClient()->mset(
            $this->getFactory()->createListConverter()->convertToList($list)
        );
    }
419889
public static function xmlToArray($xml, $format = self::XML_GROUP) {
		if (is_string($xml)) {
			$xml = @simplexml_load_string($xml);
		}

		if (count($xml->children()) <= 0) {
			return (string)$xml;
		}

		$array = array();

		foreach ($xml->children() as $element => $node) {
			$data = array();

			if (!isset($array[$element])) {
				$array[$element] = "";
			}

			if (!$node->attributes() || $format === self::XML_NONE) {
				$data = self::xmlToArray($node, $format);

			} else {
				switch ($format) {
					case self::XML_GROUP:
						$data = array(
							'attributes' => array(),
							'value' => (string)$node
						);

						if (count($node->children()) > 0) {
							$data['value'] = self::xmlToArray($node, $format);
						}

						foreach ($node->attributes() as $attr => $value) {
							$data['attributes'][$attr] = (string)$value;
						}
					break;

					case self::XML_MERGE:
					case self::XML_OVERWRITE:
						if ($format === self::XML_MERGE) {
							if (count($node->children()) > 0) {
								$data = $data + self::xmlToArray($node, $format);
							} else {
								$data['value'] = (string)$node;
							}
						}

						foreach ($node->attributes() as $attr => $value) {
							$data[$attr] = (string)$value;
						}
					break;
				}
			}

			if (count($xml->{$element}) > 1) {
				$array[$element][] = $data;
			} else {
				$array[$element] = $data;
			}
		}

		return $array;
	}
852099
public synchronized Set<String> keySet() {
		if(size == 0) {
			return new HashSet<String>(0);
		} else {
			try {
				XAttributeMap map = deserialize();
				return map.keySet();
			} catch (IOException e) {
				e.printStackTrace();
				return null;
			}
		}
	}
367698
private static function __s_list2($list)
    {
        $structure = new Structure(Structure::TYPE_LIST, '-', Structure::FOUR_SPACE_TAB);

        return static::buildStructure($list, $structure);
    }
1349278
private static function encodeList($list, &$serialized)
    {
        if (empty($list)) {
            $serialized .= "le";
            return;
        }

        $serialized .= "l";
        for ($i = 0; isset($list[$i]); $i++) {
            self::decideEncode($list[$i], $serialized);
        }
        $serialized .= "e";
    }
372310
public static final <T> Set<Set<T>> powerSet(Set<T> set)
    {
        Set<Set<T>> powerSet = new HashSet<>();
        powerSet.add(Collections.EMPTY_SET);
        powerSet(powerSet, set);
        return powerSet;
    }
1020070
public function render_set($res, $name, $dload, $sep, $config, $mix){
		$output="";
		$index=0;
		$conn = $this->conn;
		$this->mix($config, $mix);
		$conn->event->trigger("beforeRenderSet",$conn,$res,$config);
		while ($data=$conn->sql->get_next($res)){
			$data = $this->simple_mix($mix, $data);

			$data = new $name($data,$config,$index);
			if ($data->get_id()===false)
				$data->set_id($conn->uuid());
			$conn->event->trigger("beforeRender",$data);
			$output.=$data->to_xml().$sep;
			$index++;
		}
		$this->unmix($config, $mix);
		return $output;
	}
846588
protected function runSingleTaskSet(Set $set)
    {
        $this->runSet($set);
        $task = current($set->tasks);

        return $task->result;
    }
1301903
@SuppressWarnings("unchecked")
    public static Set<String> deserializeSet(String set) {
        if (set == null || set.equals("")) {
            return new HashSet<String>();
        }
        XStream xstream = new XStream(new DomDriver());
        return (Set<String>) xstream.fromXML(set);
    }
599630
public function build_xml( $data = null ) {

		if ( ! empty( $data ) ) {
			$this->set_data( $data );
		}

		if ( empty( $this->data ) || ! is_array( $this->data ) ) {
			return false;
		}

		$head  = '<' . '?' . 'xml version="1.0" encoding="utf-8" ' . '?' . '>' . "\r\n<items count=\"" . count( $this->data['items'] ) . "\">\r\n";
		$lines = '';

		foreach ( $this->data['items'] as $item ) {
			$line = "\t<item>\r\n";

			foreach ( $this->data['columns'] as $column => $label ) {
				if ( is_numeric( $column ) && ( ( is_object( $item ) && ! isset( $item->$column ) ) || ( is_array( $item ) && ! isset( $item[ $column ] ) ) ) ) {
					$column = $label;
				}

				$line .= $this->build_xml_level( $item, $column );
			}

			$line  .= "\t</item>\r\n";
			$lines .= $line;
		}

		$foot = '</items>';

		$this->built = $head . $lines . $foot;

		return $this->built;
	}
349357
private function _toFormatTree($list, $level = 0)
    {
        $formatTree = [];
        foreach ($list as $val) {
            $tmp_str = str_repeat($this->tabSize, $level);
            $tmp_str .= "└&nbsp;";
            
            $val['level'] = intval($level);
            $val[$this->showTitleField] = $level == 0 ? $val[$this->showTitleField] : $tmp_str . $val[$this->showTitleField];
            if (!array_key_exists('_child', $val)) {
                array_push($formatTree, $val);
            } else {
                $tmp_ary = $val['_child'];
                unset($val['_child']);
                array_push($formatTree, $val);
                $formatTree = array_merge($formatTree, $this->_toFormatTree($tmp_ary, $level + 1));
            }
        }
        
        return $formatTree;
    }
1018379
public function getSet($set)
    {
        if (isset($this->sets[$set])) {
            return $this->sets[$set];
        }
        return null;
    }