Dump manifest structure into a XML string.

@return string
486827
public function dump()
    {
        // Create a new XML document
        $document = new \DOMDocument('1.0', 'utf-8');
        $document->preserveWhiteSpace = false;
        $document->formatOutput = true;
        $document->loadXML($this->xml->asXML());

        return $document->saveXML();
    }
1081778
public function saveXml()
    {
        // Return a complete document including XML prologue.
        $doc = new DOMDocument($this->_element->ownerDocument->version,
                               $this->_element->ownerDocument->actualEncoding);
        $root = $doc->createElement('rss');

        // Use rss version 2.0
        $root->setAttribute('version', '2.0');

        // Content namespace
        $root->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:content', 'http://purl.org/rss/1.0/modules/content/');
        $root->appendChild($doc->importNode($this->_element, true));

        // Append root node
        $doc->appendChild($root);

        // Format output
        $doc->formatOutput = true;

        return $doc->saveXML();
    }
1046213
function xmlString( )
    {
        $doc = new DOMDocument( '1.0', 'utf-8' );

        $root = $doc->createElement( "ezoption" );
        $doc->appendChild( $root );

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

        $options = $doc->createElement( "options" );
        $root->appendChild( $options );

        foreach ( $this->Options as $option )
        {
            $optionNode = $doc->createElement( "option" );
            $optionNode->appendChild( $doc->createCDATASection( $option["value"] ) );
            $optionNode->setAttribute( "id", $option['id'] );
            $optionNode->setAttribute( 'additional_price', $option['additional_price'] );
            $options->appendChild( $optionNode );
        }

        $xml = $doc->saveXML();

        return $xml;
    }
881935
public function toString()
    {
        $result = "";
        if ($this->scheme) {
            $result .= $this->scheme.'://';
        }
        if ($this->user) {
            $result .= $this->user;
            if ($this->pass) {
                $result .= $this->user;
            }
            $result .= '@';
        }
        if ($this->host) {
            $result .= $this->host;
        }
        if ($this->port) {
            $result .= ':'.$this->port;
        }
        if ($this->pathSegments) {
            $result .= '/'.implode('/', $this->pathSegments);
        }
        if ($this->parameters) {
            $result .= '?'.http_build_query($this->parameters);
        }
        if ($this->fragment) {
            $result .= '#'.$this->fragment;
        }
        return $result;
    }
1037553
public function toXml()
    {
        $messages = '';
        /** @var ShortMessage $shortMessage */
        foreach ($this->items as $shortMessage) {
            $messages .= $shortMessage->toMultipleMessagesXml();
        }

        return $messages;
    }
880572
public function getXml()
    {
		$res  = '<widget widgetTitle="'.htmlspecialchars($this->widgetTitle).'" widgetName="'.htmlspecialchars($this->widgetName).'">'."\n";
		$res .= "<![CDATA[\n".serialize($this->getParams())."\n]]>\n";
		$res .= '</widget>'."\n";
		return $res;
	}
945129
public function ToString()
	{
		$sb = array();
		switch ( $this->TypeCode )
		{
			case XmlTypeCode::AnyAtomicType:
				$sb[] = "AnyAtomicType";
				break;

			case XmlTypeCode::UntypedAtomic:
				$sb[] = "UntypedAtomic";
				break;

			case XmlTypeCode::None:
				$sb[] = "empty-sequence()";
				break;

			case XmlTypeCode::Item:
				$sb[] = "item()";
				break;

			case XmlTypeCode::Node:
				$sb[] = "node()";
				break;

			case XmlTypeCode::Document:
				$sb[] = "document-node(";
				if ( is_null( $this->SchemaElement ) )
				{
					if ( ! $this->NameTest->IsWildcard() || is_null( $this->SchemaType ) )
					{
						$sb[] = "element(";
						$sb[] = $this->NameTest->ToString();
						if ( ! is_null( $this->SchemaType ) )
						{
							$sb[] = ",";
							$sb[] = get_class( $this->SchemaType );
							if ( $this->Nillable )
								$sb[] = "?";
						}
						else
						{
							$sb[] = ", xs:untyped";
						}
						$sb[] = ")";
					}
				}
				else
				{
					$sb[] = "schema-element(";
					$sb[] = $this->SchemaElement->QualifiedName->__toString();
					$sb[] = ")";
				}
				$sb[] = ")";
				break;

			case XmlTypeCode::Element:
				if ( is_null( $this->SchemaElement ) )
				{
					$sb[] = "element(";
					$sb[] = $this->NameTest->ToString();
					if ( ! is_null( $this->SchemaType ) )
					{
						$sb[] = ",";
						$sb[] = get_class( $this->SchemaType );
						if ( $this->Nillable )
						{
							$sb[] = "?";
						}
					}
					else
					{
						$sb[] = ", xs:untyped";
					}
				}
				else
				{
					$sb[] = "schema-element(";
					$sb[] = $this->SchemaElement->QualifiedName->__toString();
				}
				$sb[] = ")";
				break;

			case XmlTypeCode::Attribute:
				if ( is_null( $this->SchemaAttribute ) )
				{
					$sb[] = "attribute(";
					$sb[] = $this->NameTest->ToString();
					if ( ! is_null( $this->SchemaType ) )
					{
						$sb[] = ",";
						$sb[] = get_class( $this->SchemaType );
					}
				}
				else
				{
					$sb[] = "schema-attribute(";
					$sb[] = $this->SchemaAttribute->QualifiedName;
				}
				$sb[] = ")";
				break;

			case XmlTypeCode::ProcessingInstruction:
				$sb[] = "processing-instruction(";
				break;

			case XmlTypeCode::Comment:
				$sb[] = "comment()";
				break;

			case XmlTypeCode::Text:
				$sb[] = "text()";
				break;

			case XmlTypeCode::String:
				$sb[] = "xs:string";
				break;

			case XmlTypeCode::Boolean:
				$sb[] = "xs:boolean";
				break;

			case XmlTypeCode::Decimal:
				$sb[] = "xs:decimal";
				break;

			case XmlTypeCode::Float:
				$sb[] = "xs:float";
				break;

			case XmlTypeCode::Double:
				$sb[] = "xs:double";
				break;

			case XmlTypeCode::Duration:
				$sb[] = "xs:Duration";
				break;

			case XmlTypeCode::DateTime:
				$sb[] = "xs:dateTime";
				break;

			case XmlTypeCode::Time:
				$sb[] = "xs:time";
				break;

			case XmlTypeCode::Date:
				$sb[] = "xs:date";
				break;

			case XmlTypeCode::GYearMonth:
				$sb[] = "xs:gYearMonth";
				break;

			case XmlTypeCode::GYear:
				$sb[] = "xs:gYear";
				break;

			case XmlTypeCode::GMonthDay:
				$sb[] = "xs:gMonthDay";
				break;

			case XmlTypeCode::GDay:
				$sb[] = "xs:gDay";
				break;

			case XmlTypeCode::GMonth:
				$sb[] = "xs:gMonth";
				break;

			case XmlTypeCode::HexBinary:
				$sb[] = "xs:hexBinary";
				break;

			case XmlTypeCode::Base64Binary:
				$sb[] = "xs:base64Binary";
				break;

			case XmlTypeCode::AnyUri:
				$sb[] = "xs:anyURI";
				break;

			case XmlTypeCode::QName:
				$sb[] = "xs:QName";
				break;

			case XmlTypeCode::Notation:
				$sb[] = "xs:NOTATION";
				break;

			case XmlTypeCode::NormalizedString:
				$sb[] = "xs:normalizedString";
				break;

			case XmlTypeCode::Token:
				$sb[] = "xs:token";
				break;

			case XmlTypeCode::Language:
				$sb[] = "xs:language";
				break;

			case XmlTypeCode::NmToken:
				if ( $this->SchemaType == XmlSchema::$NMTOKENS )
					$sb[] = "xs:NMTOKENS";
				else
					$sb[] = "xs:NMTOKEN";
				break;

			case XmlTypeCode::Name:
				$sb[] = "xs:Name";
				break;

			case XmlTypeCode::NCName:
				$sb[] = "xs:NCName";
				break;

			case XmlTypeCode::Id:
				$sb[] = "xs:ID";
				break;

			case XmlTypeCode::Idref:
				if ( $this->SchemaType == XmlSchema::$IDREFS )
					$sb[] = "xs:IDREFS";
				else
					$sb[] = "xs:IDREF";
				break;

			case XmlTypeCode::Entity:
				if ( $this->SchemaType == XmlSchema::$ENTITIES )
					$sb[] = "xs:ENTITYS";
				else
					$sb[] = "xs:ENTITY";
				break;

			case XmlTypeCode::Integer:
				$sb[] = "xs:integer";
				break;

			case XmlTypeCode::NonPositiveInteger:
				$sb[] = "xs:nonPositiveInteger";
				break;

			case XmlTypeCode::NegativeInteger:
				$sb[] = "xs:negativeInteger";
				break;

			case XmlTypeCode::Long:
				$sb[] = "xs:long";
				break;

			case XmlTypeCode::Int:
				$sb[] = "xs:int";
				break;

			case XmlTypeCode::Short:
				$sb[] = "xs:short";
				break;

			case XmlTypeCode::Byte:
				$sb[] = "xs:byte";
				break;

			case XmlTypeCode::NonNegativeInteger:
				$sb[] = "xs:nonNegativeInteger";
				break;

			case XmlTypeCode::UnsignedLong:
				$sb[] = "xs:unsignedLong";
				break;

			case XmlTypeCode::UnsignedInt:
				$sb[] = "xs:unsignedInt";
				break;

			case XmlTypeCode::UnsignedShort:
				$sb[] = "xs:unsignedShort";
				break;

			case XmlTypeCode::UnsignedByte:
				$sb[] = "xs:unsignedByte";
				break;

			case XmlTypeCode::PositiveInteger:
				$sb[] = "xs:positiveInteger";
				break;

			case XmlTypeCode::DayTimeDuration:
				$sb[] = "xs:dayTimeDuration";
				break;

			case XmlTypeCode::YearMonthDuration:
				$sb[] = "xs:yearMonthDuration";
				break;

			default:
				$sb[] = "[]";
				break;
		}

		switch ( $this->Cardinality )
		{
			case XmlTypeCardinality::OneOrMore:
				$sb[] = "+";
				break;

			case XmlTypeCardinality::ZeroOrMore:
				$sb[] = "*";
				break;

			case XmlTypeCardinality::ZeroOrOne:
				$sb[] = "?";
				break;
		}

		return implode( "", $sb );
	}
1028706
public function serializeToXml()
    {
        $xml = new \SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><BucketLoggingStatus></BucketLoggingStatus>');
        if (isset($this->targetBucket) && isset($this->targetPrefix)) {
            $loggingEnabled = $xml->addChild('LoggingEnabled');
            $loggingEnabled->addChild('TargetBucket', $this->targetBucket);
            $loggingEnabled->addChild('TargetPrefix', $this->targetPrefix);
        }
        return $xml->asXML();
    }
455626
public function xmlOutput() {
        $o = '';
        $o.= '    <TABLE NAME="' . $this->name . '"';
        if ($this->comment) {
            $o.= ' COMMENT="' . htmlspecialchars($this->comment) . '"';
        }
        $o.= '>' . "\n";
        // Now the fields
        if ($this->fields) {
            $o.= '      <FIELDS>' . "\n";
            foreach ($this->fields as $field) {
                $o.= $field->xmlOutput();
            }
            $o.= '      </FIELDS>' . "\n";
        }
        // Now the keys
        if ($this->keys) {
            $o.= '      <KEYS>' . "\n";
            foreach ($this->keys as $key) {
                $o.= $key->xmlOutput();
            }
            $o.= '      </KEYS>' . "\n";
        }
        // Now the indexes
        if ($this->indexes) {
            $o.= '      <INDEXES>' . "\n";
            foreach ($this->indexes as $index) {
                $o.= $index->xmlOutput();
            }
            $o.= '      </INDEXES>' . "\n";
        }
        $o.= '    </TABLE>' . "\n";

        return $o;
    }
1126490
protected function attributesToString()
    {
        $string = '';
        $XMLConvention = in_array(static::$outputLanguage, array(ENT_XML1, ENT_XHTML));
        if (!empty($this->attributeList)) {
            foreach ($this->attributeList as $key => $value) {
                if ($value!==null && ($value!==false || $XMLConvention)) {
                    $string.= ' ' . $key;
                    if ($value===true) {
                        if ($XMLConvention) {
                            $value = $key;
                        } else {
                            continue;
                        }
                    }
                    $string.= '="' . implode(
                        ' ',
                        array_map(
                            static::$avoidXSS ? 'static::unXSS' : 'strval',
                            is_array($value) ? $value : array($value)
                        )
                    ) . '"';
                }
            }
        }
        return $string;
    }
651633
protected function getUiXml()
    {
        $dir = '@data-dir@' . DIRECTORY_SEPARATOR
            . '@package-name@' . DIRECTORY_SEPARATOR . 'data';

        if ($dir[0] == '@') {
            $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . '..'
                . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'data';
        }

        return $dir . DIRECTORY_SEPARATOR . 'server-cli.xml';
    }
159744
public function toString()
    {
        $headers = $this->toArray();
        $content = '';

        //Serialise the headers to a string
        foreach ($headers as $name => $value) {
            $content .= sprintf("%s %s\r\n", $name.':', $value);
        }

        return $content;
    }
681302
public function toString()
    {
        $result = '';

        if (!empty($this->scheme)) {
            $result.= $this->scheme . ':';
        }

        if (!empty($this->authority)) {
            $result.= '//' . $this->authority;
        }

        $result.= $this->path;

        if (!empty($this->query)) {
            $result.= '?' . $this->query;
        }

        if (!empty($this->fragment)) {
            $result.= '#' . $this->fragment;
        }

        return $result;
    }
1094161
protected function dump() {
    $str = '';
    foreach (array_values($this->loadedObjects) as $curObject) {
      $str .= $curObject->dump();
    }
    return $str;
  }
984986
public function getOuterXml()
	{
		if ( is_null( $this->domNode ) ) return "";
		return is_null( $this->domNode->parentNode )
			? $this->domNode->ownerDocument->saveXml( $this->domNode )
			: $this->domNode->ownerDocument->saveXml( $this->domNode->parentNode );
	}
1018703
public function outputHtml()
    {
        $result = '';
        if (!is_null($this->dom)) {
            //SaveXML : <br/><img/>
            //SaveHTML: <br><img>
            $result = trim($this->dom->saveXML($this->getRealElement()));
            $result = str_replace($this->TEMP_CONTENT, '', $result);
            $parentTagNameLength = strlen($this->PARENT_TAG_NAME);
            $result = substr($result, $parentTagNameLength + 2, -($parentTagNameLength + 3));
        }
        return $result;
    }
1169559
public function toXml()
    {
        $xml = new \SimpleXMLElement(
                '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><parser></parser>');
        
        $xml->addChild('fqdn', $this->fqdn);
        $xml->addChild('idn_fqdn', $this->idnFqdn);
        $xml->addChild('domain', $this->domain);
        $xml->addChild('idnDomain', $this->idnDomain);
        $xml->addChild('tld', $this->tld);
        $xml->addChild('idnTld', $this->idnTld);
        $xml->addChild('tldGroup', $this->tldGroup);
        $xml->addChild('validHostname', $this->validHostname);
        
        return $xml->asXML();
    }