...
Implements XML RPC method 'grav.saveUrl'.
@todo		test, code doc
963039
public function saveImageFromUrl( $email, $password, $imageUrl, $rating = 0 ){
		throw new RuntimeException( 'Not tested yet' );
		$response	= $this->callXmlRpc( $email, 'saveUrl', array(
			'password'	=> $password,
			'url'		=> $imageUrl,
			'rating'	=> $rating
		) );
		return $response[0];
	}
754478
def save_xml(self, doc, element):
        '''

        '''
        super(TargetExecutionContext, self).save_xml(doc, element)
        element.setAttributeNS(RTS_NS, RTS_NS_S + 'id', self.id)
893319
def save(nsc)
      root = REXML::XPath.first(@xml, 'ScanTemplate')
      if root.attributes['id'] == '#NewScanTemplate#'
        response = JSON.parse(AJAX.post(nsc, '/data/scan/templates', xml))
        root.attributes['id'] = response['value']
      else
        response = JSON.parse(AJAX.put(nsc, "/data/scan/templates/#{URI.encode(id)}", xml))
      end
      response['value']
    end
556079
public function save()
    {
        if (empty($this->attributes->guid)) {
            $this->attributes->guid = $this->createGuid();
        }

        // expand link template
        $urn = self::URN_SAVE;
        $link = $this->edit($urn);
        if (!$link) {
            throw new LinkException("Unable to find link $urn - have you loaded the document yet?");
        }
        $url = $link->expand(array('guid' => $this->attributes->guid));

        // create a saveable version of this doc
        $json = new \StdClass();
        $json->version = $this->version;
        $json->attributes = $this->attributes;
        $json->links = new \StdClass();
        foreach ($this->links as $relType => $links) {
            if (!in_array($relType, self::$_staticLinkNames)) {
                $json->links->$relType = $links;
            }
        }

        // remote save
        $resp = $this->_request('put', $url, $json);
        if (empty($resp->url)) {
            $data = ['url' => $url, 'body' => json_encode($json)];
            throw new RemoteException('Invalid PUT response missing url!', $data);
        }

        // re-load doc
        $this->href = $resp->url;
        $this->load();
        return $this;
    }
1170849
public function save()
    {
        /** @var CompiledYamlFile $file */
        $file = $this->file();
        if (!$file || !$file->filename()) {
            user_error(__CLASS__ . ': calling \$user = new ' . __CLASS__ . "() is deprecated since Grav 1.6, use \$grav['accounts']->load(\$username) or \$grav['accounts']->load('') instead", E_USER_DEPRECATED);
        }

        if ($file) {
            $username = $this->get('username');

            if (!$file->filename()) {
                $locator = Grav::instance()['locator'];
                $file->filename($locator->findResource('account://' . mb_strtolower($username) . YAML_EXT, true, true));
            }

            // if plain text password, hash it and remove plain text
            $password = $this->get('password');
            if ($password) {
                $this->set('hashed_password', Authentication::create($password));
                $this->undef('password');
            }

            $data = $this->items;
            unset($data['username'], $data['authenticated'], $data['authorized']);

            $file->save($data);
        }
    }
965165
public function saveAs($strXML, $outputFile)
    {
        if ($strXML == '')
            throw new Exception('XML Data not specified');
        
        if ($outputFile == '')
            throw new Exception('Output Filename along extension not specified');
        
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/saveAs?newfilename=' . $outputFile;
        $signedURI = Utils::Sign($strURI);
        $responseStream = Utils::processCommand($signedURI, "POST", "XML", $strXML);
        
        $v_output = Utils::validateOutput($responseStream);
        
        if ($v_output === '') {
            $strURI = Product::$baseProductUri . '/storage/file/' . $outputFile;
            $signedURI = Utils::Sign($strURI);
            $responseStream = Utils::processCommand($signedURI, "GET", "", "");

            $outputPath = AsposeApp::$outPutLocation . $outputFile;
            Utils::saveFile($responseStream, $outputPath);
            
            return $outputPath;
        } else {
            return $v_output;
        }         
    }
833761
def save(connection)
      xml = %(<ReportTemplateSaveRequest session-id='#{connection.session_id}' scope='#{@scope}'>)
      xml << to_xml
      xml << '</ReportTemplateSaveRequest>'
      response = connection.execute(xml)
      if response.success
        @id = response.attributes['template-id']
      end
    end
947429
function serialize($charset_encoding='')
		{
			if ($charset_encoding != '')
				$this->content_type = 'text/xml; charset=' . $charset_encoding;
			else
				$this->content_type = 'text/xml';
			if ($GLOBALS['xmlrpc_null_apache_encoding'])
			{
				$result = "<methodResponse xmlns:ex=\"".$GLOBALS['xmlrpc_null_apache_encoding_ns']."\">\n";
			}
			else
			{
			$result = "<methodResponse>\n";
			}
			if($this->errno)
			{
				// G. Giunta 2005/2/13: let non-ASCII response messages be tolerated by clients
				// by xml-encoding non ascii chars
				$result .= "<fault>\n" .
"<value>\n<struct><member><name>faultCode</name>\n<value><int>" . $this->errno .
"</int></value>\n</member>\n<member>\n<name>faultString</name>\n<value><string>" .
xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $charset_encoding) . "</string></value>\n</member>\n" .
"</struct>\n</value>\n</fault>";
			}
			else
			{
				if(!is_object($this->val) || !is_a($this->val, 'xmlrpcval'))
				{
					if (is_string($this->val) && $this->valtyp == 'xml')
					{
						$result .= "<params>\n<param>\n" .
							$this->val .
							"</param>\n</params>";
					}
					else
					{
						/// @todo try to build something serializable?
						die('cannot serialize xmlrpcresp objects whose content is native php values');
					}
				}
				else
				{
					$result .= "<params>\n<param>\n" .
						$this->val->serialize($charset_encoding) .
						"</param>\n</params>";
				}
			}
			$result .= "\n</methodResponse>";
			$this->payload = $result;
			return $result;
		}
1321091
def save(connection)
      nsc                                   = REXML::XPath.first(@xml, 'NeXposeSecurityConsole')
      nsc.attributes['scanThreadsLimit']    = @scan_threads_limit.to_i
      nsc.attributes['realtimeIntegration'] = @incremental_scan_results ? '1' : '0'

      web_server                              = REXML::XPath.first(nsc, 'WebServer')
      web_server.attributes['sessionTimeout'] = @session_timeout.to_i

      response = REXML::Document.new(Nexpose::AJAX.post(connection, '/data/admin/config/nsc', @xml))
      saved    = REXML::XPath.first(response, 'SaveConfig')
      saved.attributes['success'] == '1'
    end
946189
def _buildFileUrl(self, xml_req):
		""""""
		return '%(protocol)s://%(host)s:%(port)s%(xml_req)s'%{
			'protocol': self._protocol,
			'host': self._host,
			'port': self._port,
			'xml_req': xml_req,
		}
373312
public DataUrl build() throws NullPointerException {
        if (data == null) {
            throw new NullPointerException("data is null!");
        } else if (encoding == null) {
            throw new NullPointerException("encoding is null!");
        }
        return new DataUrl(data, encoding, mimeType, headers);
    }
897745
def save_xml(self, doc, element):
        ''''''
        new_element = doc.createElementNS(RTS_NS, RTS_NS_S + 'Participant')
        self.target_component.save_xml(doc, new_element)
        element.appendChild(new_element)
102284
@Override
    public void actionSave() throws JspException {

        CmsFile editFile = null;
        try {
            editFile = getCms().readFile(getParamResource(), CmsResourceFilter.ALL);
            String decodedContent = decodeContentParameter(getParamContent(), getFileEncoding(), editFile);
            try {
                editFile.setContents(decodedContent.getBytes(getFileEncoding()));
            } catch (UnsupportedEncodingException e) {
                throw new CmsException(
                    Messages.get().container(Messages.ERR_INVALID_CONTENT_ENC_1, getParamResource()),
                    e);
            }
            if (OpenCms.getWorkplaceManager().isXmlContentAutoCorrect()
                && (CmsResourceTypeXmlContent.isXmlContent(editFile))) {
                // enable auto correction in case of XML content (if configured)
                getCms().getRequestContext().setAttribute(CmsXmlContent.AUTO_CORRECTION_ATTRIBUTE, Boolean.TRUE);
            }
            // the file content might have been modified during the write operation
            CmsFile writtenFile = getCms().writeFile(editFile);
            decodedContent = CmsEncoder.createString(writtenFile.getContents(), getFileEncoding());
            setParamContent(encodeContent(decodedContent));
            // set the modified parameter
            setParamModified(Boolean.TRUE.toString());
        } catch (CmsException e) {
            showErrorPage(e);
        }

        if (getAction() != ACTION_CANCEL) {
            // save successful, set save action
            setAction(ACTION_SAVE);
        }
    }
575863
public static function save()
	{
		self::lock();
		if ( is_null( self::$authFileP ) ) throw new Exception( 'No lock has been requested' );

		$file = '<?php if (realpath(__FILE__)===realpath($_SERVER["SCRIPT_FILENAME"])) {header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");die();}?>' . "\n";
		$file.= json_encode( self::$auth );

		self::write( $file );

		return true;
	}
1132940
public function save($match = '*')
	{
		if ($this->isAuthenticated())
		{
			$url = $this->getLink();

			if ($match === true)
			{
				$match = $this->xml->xpath('./@gd:etag');
				$match = $match[0];
			}

			try
			{
				$headers = array('GData-Version' => 2, 'Content-type' => 'application/atom+xml', 'If-Match' => $match);
				$jdata   = $this->query($url, $this->xml->asXML(), $headers, 'put');
			}
			catch (\Exception $e)
			{
				if (strpos($e->getMessage(), 'Error code 412 received requesting data: Mismatch: etags') === 0)
				{
					throw new \RuntimeException("Etag match failed: `$match`.");
				}

				throw $e;
			}

			$this->xml = $this->safeXml($jdata->body);

			return $this;
		}

		return false;
	}
1013907
public void save(XMLWriter w) throws KNXMLException
	{
		final List att = new ArrayList();
		att.add(new Attribute(ATTR_TYPE, getType()));
		w.writeElement(TAG_ADDRESS, att, Integer.toString(address));
		w.endElement();
	}
311552
def save_xml(self, doc, element):
        ''''''
        element.setAttributeNS(RTS_NS, RTS_NS_S + 'componentId',
                               self.component_id)
        element.setAttributeNS(RTS_NS, RTS_NS_S + 'instanceName',
                               self.instance_name)
        for p in self.properties:
            new_prop_element = doc.createElementNS(RTS_EXT_NS,
                                                   RTS_EXT_NS_S + 'Properties')
            properties_to_xml(new_prop_element, p, self.properties[p])
            element.appendChild(new_prop_element)