Create a new {@link PublishRequest} that contains the given {@link PublishElement}

@param el the {@link PublishElement} that is added to the new {@link PublishRequest}
@return the new {@link PublishRequest}
172161
public static PublishRequest createPublishReq(PublishElement el) {
		if (el == null) {
			throw new NullPointerException("el is not allowed to be null");
		}

		PublishRequest ret = createPublishReq();
		ret.addPublishElement(el);
		return ret;
	}
988382
private Element createElement(final Document theTargetDocument, final String theName) {
        final Element indexEntryNode = theTargetDocument.createElementNS(this.namespace_url, theName);
        indexEntryNode.setPrefix(this.prefix);
        return indexEntryNode;
    }
1362477
public void createAndEditNewElement(
        final org.opencms.ade.containerpage.client.ui.CmsContainerPageElementPanel element,
        final boolean inline) {

        if (!element.isNew()) {
            return;
        }

        final CmsContainer container = m_containers.get(element.getParentTarget().getContainerId());

        m_handler.showPageOverlay();
        CmsRpcAction<CmsCreateElementData> action = new CmsRpcAction<CmsCreateElementData>() {

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
             */
            @Override
            public void execute() {

                getContainerpageService().checkCreateNewElement(
                    CmsCoreProvider.get().getStructureId(),
                    element.getId(),
                    element.getNewType(),
                    container,
                    getLocale(),
                    this);

            }

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object)
             */
            @Override
            protected void onResponse(CmsCreateElementData result) {

                if (result.needsModelSelection()) {
                    getHandler().openModelResourceSelect(element, result.getModelResources());
                } else {
                    openEditorForNewElement(element, result.getCreatedElement(), inline);
                }
            }
        };
        action.execute();
    }
160394
protected DOMOutputElement createAndAttachChild(Element element)
    {
        if (mRootNode != null) {
            mRootNode.appendChild(element);
        } else {
            mElement.appendChild(element);
        }
        return createChild(element);
    }
346651
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "engineeringDatumRef")
    public JAXBElement<EngineeringDatumRefType> createEngineeringDatumRef(EngineeringDatumRefType value) {
        return new JAXBElement<EngineeringDatumRefType>(_EngineeringDatumRef_QNAME, EngineeringDatumRefType.class, null, value);
    }
225593
function createAndPublishElement( $elementName, &$ret )
    {
        $element = $this->Document->createElement( $elementName );
        $element->setAttributeNS( 'http://ez.no/namespaces/ezpublish3/temporary/', 'tmp:new-element', 'true' );

        if ( !isset( $ret['new_elements'] ) )
        {
            $ret['new_elements'] = array();
        }

        $ret['new_elements'][] = $element;
        return $element;
    }
1206349
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "Envelope")
    public JAXBElement<EnvelopeType> createEnvelope(EnvelopeType value) {
        return new JAXBElement<EnvelopeType>(_Envelope_QNAME, EnvelopeType.class, null, value);
    }
1121895
@XmlElementDecl(namespace = "urn:switchyard-quickstart-demo:library:1.0", name = "returnRequest")
    public JAXBElement<ReturnRequest> createReturnRequest(ReturnRequest value) {
        return new JAXBElement<ReturnRequest>(RETURN_REQUEST_QNAME, ReturnRequest.class, null, value);
    }
142998
function(el) {
      var newDOM = document.createElement(el.tagName);
      _.each(el.attributes, function(attrib) {
        newDOM.setAttribute(attrib.name, attrib.value);
      });
      return newDOM;
    }
282060
@SuppressWarnings("unchecked")
	protected Element createElement(Document document, Simon simon) {
		// Simon type is used as element name
		Sample sample = simon.sample();
		SimonType lType = SimonTypeFactory.getValueFromInstance(sample);
		Element element = document.createElement(lType.name().toLowerCase());
		// Only to have the name as first attribute
		element.setAttribute("name", sample.getName());
		// Export properties using reflection
		for (Getter getter : GetterFactory.getGetters(sample.getClass())) {
			Object propertyValue = getter.get(sample);
			if (propertyValue != null) {
				Stringifier propertyStringifier = stringifierFactory
					.getStringifier(getter.getType(), getter.getSubType());
				if (propertyStringifier != null) {
					element.setAttribute(getter.getName(), propertyStringifier.toString(propertyValue));
				}
			}
		}
		// Export attribute map
		Iterator<String> attributeNameIter = simon.getAttributeNames();
		while (attributeNameIter.hasNext()) {
			String attributeName = attributeNameIter.next();
			Object attributeValue = simon.getAttribute(attributeName);
			if (attributeValue != null) {
				Stringifier attributeStringifier = stringifierFactory
					.getStringifier(attributeValue.getClass());
				if (attributeStringifier != null) {
					Element attributeElt = document.createElement("attribute");
					attributeElt.setAttribute("name", attributeName);
					attributeElt.setAttribute("value", attributeStringifier.toString(attributeValue));
					element.appendChild(attributeElt);
				}
			}

		}
		return element;

	}
495772
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "ConventionalUnit", substitutionHeadNamespace = "http://www.opengis.net/gml", substitutionHeadName = "UnitDefinition")
    public JAXBElement<ConventionalUnitType> createConventionalUnit(ConventionalUnitType value) {
        return new JAXBElement<ConventionalUnitType>(_ConventionalUnit_QNAME, ConventionalUnitType.class, null, value);
    }
87612
@XmlElementDecl(namespace = "https://www.google.com/apis/ads/publisher/v201902", name = "RequestHeader")
    public JAXBElement<SoapRequestHeader> createRequestHeader(SoapRequestHeader value) {
        return new JAXBElement<SoapRequestHeader>(_RequestHeader_QNAME, SoapRequestHeader.class, null, value);
    }
1080429
public function createRole(Request $request)
    {
        $publish = (
            !$request->query->has('publish') ||
            ($request->query->has('publish') && $request->query->get('publish') === 'true')
        );

        try {
            $roleDraft = $this->roleService->createRole(
                $this->inputDispatcher->parse(
                    new Message(
                        [
                            'Content-Type' => $request->headers->get('Content-Type'),
                            // @todo Needs refactoring! Temporary solution so parser has access to get parameters
                            '__publish' => $publish,
                        ],
                        $request->getContent()
                    )
                )
            );
        } catch (InvalidArgumentException $e) {
            throw new ForbiddenException($e->getMessage());
        } catch (UnauthorizedException $e) {
            throw new ForbiddenException($e->getMessage());
        } catch (LimitationValidationException $e) {
            throw new BadRequestException($e->getMessage());
        } catch (Exceptions\Parser $e) {
            throw new BadRequestException($e->getMessage());
        }

        if ($publish) {
            @trigger_error(
                "Create and publish role in the same operation is deprecated, and will be removed in the future.\n" .
                'Instead, publish the role draft using Role::publishRoleDraft().',
                E_USER_DEPRECATED
            );

            $this->roleService->publishRoleDraft($roleDraft);

            $role = $this->roleService->loadRole($roleDraft->id);

            return new Values\CreatedRole(['role' => new Values\RestRole($role)]);
        }

        return new Values\CreatedRole(['role' => new Values\RestRole($roleDraft)]);
    }
927469
function elementCreate(name, overriddenRenderer) {
    var native;
    var rendererToUse = overriddenRenderer || renderer;
    if (isProceduralRenderer(rendererToUse)) {
        native = rendererToUse.createElement(name, _currentNamespace);
    }
    else {
        if (_currentNamespace === null) {
            native = rendererToUse.createElement(name);
        }
        else {
            native = rendererToUse.createElementNS(_currentNamespace, name);
        }
    }
    return native;
}
1117074
@XmlElementDecl(namespace = "http://schema.intuit.com/finance/v3", name = "JournalCode", substitutionHeadNamespace = "http://schema.intuit.com/finance/v3", substitutionHeadName = "IntuitObject")
    public JAXBElement<JournalCode> createJournalCode(JournalCode value) {
        return new JAXBElement<JournalCode>(_JournalCode_QNAME, JournalCode.class, null, value);
    }
1372657
public void createNewElement(
        final CmsContainerPageElementPanel element,
        final AsyncCallback<CmsContainerElement> callback) {

        CmsRpcAction<CmsContainerElement> action = new CmsRpcAction<CmsContainerElement>() {

            @Override
            public void execute() {

                getContainerpageService().createNewElement(
                    CmsCoreProvider.get().getStructureId(),
                    element.getId(),
                    element.getNewType(),
                    null,
                    getLocale(),
                    this);

            }

            @Override
            protected void onResponse(CmsContainerElement result) {

                callback.onSuccess(result);
            }
        };
        action.execute();
    }
459540
public static EscEvent create(final JsonObject jsonObj) {
        final String eventId = jsonObj.getString(EL_EVENT_ID);
        final String eventType = jsonObj.getString(EL_EVENT_TYPE);
        final JsonObject jsonData = jsonObj.getJsonObject(EL_DATA);
        final JsonObject jsonMeta = jsonObj.getJsonObject(EL_META_DATA);
        return new EscEvent(UUID.fromString(eventId), eventType, new DataWrapper(jsonData), new DataWrapper(jsonMeta));
    }