Creates a DOM element from the provided string.

@param {string} value - String describing the DOM element.

@return {Node} DOM element.

@alias module:requiem~dom.createElement
964296
function createElement(value) {
  if (!document) return null;

  assertType(value, 'string', true, 'Value must be a string');

  if (value.match(/^([a-z0-9]+-)+[a-z0-9]+$/)) {
    return new (getElementRegistry(value))();
  }
  else {
    let div = document.createElement('div');
    if (value.indexOf('<') !== 0 && value.indexOf('>') !== (value.length - 1)) value = `<${value}>`;
    div.innerHTML = value;
    return div.firstChild;
  }
}
1244814
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "typeId", scope = GetTypeDescendants.class)
	public JAXBElement<String> createGetTypeDescendantsTypeId(String value) {
		return new JAXBElement<String>(_GetTypeChildrenTypeId_QNAME,
				String.class, GetTypeDescendants.class, value);
	}
447594
@Override
    public Object convert(Object value) {
       if(value instanceof Element) {
           return parseXmlElement((Element) value);
       }
       if(value instanceof CompositeData) {
           return toMap((CompositeData)value);
       }
       return value;
    }
478931
private function setElementValue(DOMDocument $dom, DOMElement $node, $value = null)
    {
        if ($value instanceof \SimpleXMLElement) {
            return $node->appendChild($dom->importNode(dom_import_simplexml($value), true));
        }

        if ($value instanceof \DOMDocument) {
            return $node->appendDomElement($value->firstChild);
        }

        if ($value instanceof \DOMElement) {
            return $dom->appendDomElement($value, $node);
        }

        if (is_array($value) || $value instanceof \Traversable) {
            return $this->buildXML($dom, $node, $value);
        }

        if (is_int($value) || is_float($value)) {
            return $this->createText($dom, $node, (string)$value);
        }

        if (is_bool($value)) {
            return $this->createText($dom, $node, $value ? 'true' : 'false');
        }

        if (is_string($value) || null === $value) {
            return $this->appendTextNode($dom, $node, (string)$value);
        }

        return false;
    }
1283146
public static Text createTextNode(String value)
   {
      Document doc = getOwnerDocument();
      return doc.createTextNode(value);
   }
658460
private XmlNode[] getNodesForInsert(Object value) {
        if (value instanceof XML) {
            return new XmlNode[] { ((XML)value).node };
        } else if (value instanceof XMLList) {
            XMLList list = (XMLList)value;
            XmlNode[] rv = new XmlNode[list.length()];
            for (int i=0; i<list.length(); i++) {
                rv[i] = list.item(i).node;
            }
            return rv;
        } else {
            return new XmlNode[] {
                XmlNode.createText(getProcessor(), ScriptRuntime.toString(value))
            };
        }
    }
142472
function createDom(str) {
    var name = FRAGMENT_REG.test(str) && RegExp.$1;
    if (!(name in CONTAINERS)) {
      name = '*';
    }
    var container = CONTAINERS[name];
    str = str.replace(/(^\s*)|(\s*$)/g, '');
    container.innerHTML = '' + str;
    var dom = container.childNodes[0];
    container.removeChild(dom);
    return dom;
  }
21919
@XmlElementDecl(namespace = "http://www.ibm.com/websphere/wim", name = "labeledURI")
    public JAXBElement<String> createLabeledURI(String value) {
        return new JAXBElement<String>(_LabeledURI_QNAME, String.class, null, value);
    }
362751
public function setValue(string $value = null) : Element
    {
        $this->value = $value;
        if (isset($this->model)) {
            $this->model->{$this->attributes['name']} = $value;
        }
        return $this;
    }
1140797
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "stringValue")
    public JAXBElement<String> createStringValue(String value) {
        return new JAXBElement<String>(_StringValue_QNAME, String.class, null, value);
    }
483326
function createText(value, data) {
  const node = { object: 'text', data };
  const leaves = isArray(value) ? value : [{ text: value }];
  return { ...node, leaves };
}
1347545
public static XPathCheckResult parse(String value) {
        XPathCheckResult parsed = new XPathCheckResult();
        parsed.result = value;
        return parsed;
    }
759984
function (value, node) {
        var i, el;
        var valid = (typeof value === "object");
        var fields = {};
        if (valid) {
            /*  pass 1: ensure that all mandatory fields exist
                and determine map of valid fields for pass 2  */
            for (i = 0; i < node.elements.length; i++) {
                el = node.elements[i];
                fields[el.key] = el.element;
                if (   el.arity[0] > 0
                    && (   (el.key === "@" && _cs.keysof(value).length === 0)
                        || (el.key !== "@" && typeof value[el.key] === "undefined"))) {
                    valid = false;
                    break;
                }
            }
        }
        if (valid) {
            /*  pass 2: ensure that no unknown fields exist
                and that all existing fields are valid  */
            for (var field in value) {
                if (   !Object.hasOwnProperty.call(value, field)
                    || !Object.propertyIsEnumerable.call(value, field)
                    || field === "constructor"
                    || field === "prototype"                          )
                    continue;
                if (   typeof fields[field] !== "undefined"
                    && this.exec_spec(value[field], fields[field])) /*  RECURSION  */
                    continue;
                if (   typeof fields["@"] !== "undefined"
                    && this.exec_spec(value[field], fields["@"]))   /*  RECURSION  */
                    continue;
                valid = false;
                break;
            }
        }
        return valid;
    }
20978
def _create_dom(data):
    
    if not isinstance(data, dhtmlparser.HTMLElement):
        data = dhtmlparser.parseString(
            utils.handle_encodnig(data)
        )

    dhtmlparser.makeDoubleLinked(data)

    return data
1301017
@XmlElementDecl(namespace = "", name = "message")
    public JAXBElement<String> createMessage(String value) {
        return new JAXBElement<String>(_Message_QNAME, String.class, null, value);
    }
1289404
public function createElement($name, $value = null, array $attributes = [])
    {
        $node = $this->document->createElement($name);

        return new Element($node, $value, $attributes);
    }
1324625
private function createText(\DOMDocument $dom, \DOMNode $node, $value)
    {
        $text = $dom->createTextNode($value);
        $node->appendChild($text);
    }