Writes an inner XML representing the content.

@param \XMLWriter $xmlWriter The XML writer
323167
public function writeInnerXml(\XMLWriter  $xmlWriter)
    {
        Validate::notNull($xmlWriter, 'xmlWriter');
        $xmlWriter->writeRaw($this->text);
    }
37725
private function encodeObject(XMLWriter $xml, $value) {

        if ( $value instanceof \DateTime ) $xml->writeElement("dateTime.iso8601", self::timestampToIso8601Time($value->format('U')));

        else throw new XmlrpcException("Unknown type for encoding");

    }
1133320
public void xmlWriteOn(FormattedWriter writer) throws IOException {
        writer.newLine();
        writer.startTag(XML_ITEM_MAP);
        writer.indent();
        for (int i = 0; i < _entry.length; i++) {
            Entry entry =  _entry[i];
            while (null != entry) {
                AbstractItemLink ail = entry.link;
                writer.newLine();
                ail.xmlShortWriteOn(writer);
                entry = entry.next;
            }
        }
        writer.outdent();
        writer.newLine();
        writer.endTag(XML_ITEM_MAP);
    }
797647
protected function writeMetaData(\XMLWriter $xmlWriter, Workout $workout)
    {
        $xmlWriter->startElement('metadata');
        if ($workout->author() !== null) {
            $xmlWriter->startElement('author');
            $xmlWriter->writeElement('name', $workout->author()->name());
            $xmlWriter->endElement();
        }
        $xmlWriter->endElement();
    }
130867
private function writeTracks(\XMLWriter $xmlWriter, Workout $workout)
    {
        foreach ($workout->tracks() as $track) {
            $xmlWriter->startElement('trk');
            $xmlWriter->writeElement('type', $track->sport());
            $xmlWriter->startElement('trkseg');
            $this->writeTrackPoints($xmlWriter, $track->trackPoints());
            $xmlWriter->endElement();
            $xmlWriter->endElement();
        }
    }
873550
public void write(XMLStreamWriter writer, AttributeDefinition<?> def) throws XMLStreamException {
      write(writer, def, def.xmlName());
   }
1167820
public function writeXMLAttributes( \XMLWriter $w )
   {

      switch ( $this->data[ 'type' ] )
      {

         case ImageSizeReducerType::CROP:
            $w->writeAttribute( 'type',   'crop' );
            $w->writeAttribute( 'width',  $this->data[ 'width' ] );
            $w->writeAttribute( 'height', $this->data[ 'height' ] );
            break;

         case ImageSizeReducerType::RESIZE:
            $w->writeAttribute( 'type',   'resize' );
            $w->writeAttribute( 'width',  $this->data[ 'width' ] );
            $w->writeAttribute( 'height', $this->data[ 'height' ] );
            break;

         case ImageSizeReducerType::LONG_SIDE:
            $w->writeAttribute( 'type',      'long' );
            $w->writeAttribute( 'landscape', $this->data[ 'landscape' ] );
            $w->writeAttribute( 'portrait',  $this->data[ 'portrait' ] );
            break;

         case ImageSizeReducerType::SHORT_SIDE:
            $w->writeAttribute( 'type',      'short' );
            $w->writeAttribute( 'landscape', $this->data[ 'landscape' ] );
            $w->writeAttribute( 'portrait',  $this->data[ 'portrait' ] );
            break;

         default: break;

      }

   }
528097
protected function write()
	{
		$ww		= new XML_WDDX_FileWriter( $this->fileName );
		foreach( $this->getConfigValues() as $sectionName => $sectionData )
			foreach( $sectionData as $key => $value)
				$ww->add( $key, $value );
		$ww->write();
	}
28432
public void xmlWriteOn(FormattedWriter writer) throws IOException
  {
    writer.newLine();
    writer.taggedValue("streamId", _streamId);
    writer.taggedValue("streamKey", _streamKey);
  }
939761
protected function createStreamWriter(string $xmlExtension): XmlStreamWriter
    {
        $className = $this->types[$xmlExtension];
        return new $className($this->version, $this->encoding);
    }
408403
public void xmlWriteOn(FormattedWriter writer) throws IOException  
  {
    writer.newLine();
    writer.startTag("messagingEngineUuid");
    writer.write(messagingEngineUuid.toString());
    writer.endTag("messagingEngineUuid");
  }
993362
public function writeInnerXml(\XMLWriter $xmlWriter)
    {
        Validate::notNull($xmlWriter, 'xmlWriter');
        if (!is_null($this->attributes)) {
            if (is_array($this->attributes)) {
                foreach ($this->attributes as $attributeName => $attributeValue) {
                    $xmlWriter->writeAttribute($attributeName, $attributeValue);
                }
            }
        }

        if (!is_null($this->author)) {
            Validate::isArray($this->author, Resources::AUTHOR);
            $this->writeArrayItem($xmlWriter, $this->author, Resources::AUTHOR);
        }

        if (!is_null($this->category)) {
            Validate::isArray($this->category, Resources::CATEGORY);
            $this->writeArrayItem(
                $xmlWriter,
                $this->category,
                Resources::CATEGORY
            );
        }

        if (!is_null($this->contributor)) {
            Validate::isArray($this->contributor, Resources::CONTRIBUTOR);
            $this->writeArrayItem(
                $xmlWriter,
                $this->contributor,
                Resources::CONTRIBUTOR
            );
        }

        if (!is_null($this->generator)) {
            $this->generator->writeXml($xmlWriter);
        }

        if (!is_null($this->icon)) {
            $xmlWriter->writeElementNS(
                'atom',
                'icon',
                Resources::ATOM_NAMESPACE,
                $this->icon
            );
        }

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'logo',
            Resources::ATOM_NAMESPACE,
            $this->logo
        );

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'id',
            Resources::ATOM_NAMESPACE,
            $this->id
        );

        if (!is_null($this->link)) {
            Validate::isArray($this->link, Resources::LINK);
            $this->writeArrayItem(
                $xmlWriter,
                $this->link,
                Resources::LINK
            );
        }

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'rights',
            Resources::ATOM_NAMESPACE,
            $this->rights
        );

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'subtitle',
            Resources::ATOM_NAMESPACE,
            $this->subtitle
        );

        $this->writeOptionalElementNS(
            $xmlWriter,
            'atom',
            'title',
            Resources::ATOM_NAMESPACE,
            $this->title
        );

        if (!is_null($this->updated)) {
            $xmlWriter->writeElementNS(
                'atom',
                'updated',
                Resources::ATOM_NAMESPACE,
                $this->updated->format(\DateTime::ATOM)
            );
        }
    }
1363456
protected function writeExtensions(\XMLWriter $xmlWriter, array $extensions)
    {
        $xmlWriter->startElement('extensions');
        foreach ($extensions as $extension) {
            switch ($extension::ID()) {
                case HR::ID():
                    $xmlWriter->startElementNs('gpxtpx', 'TrackPointExtension', null);
                    $xmlWriter->writeElementNs('gpxtpx', 'hr', null, (string)$extension->value());
                    $xmlWriter->endElement();
                    break;
            }
        }
        $xmlWriter->endElement();
    }
1063064
final public function write($xml)
    {

        if($xml instanceof \SimpleXMLElement){
            $xml = $xml->asXML();
        } elseif($xml instanceof \DOMDocument){
            $xml = $xml->saveXML();
        }

        $this->log("SENT: ".$xml);

        return parent::write($xml);
    }
989878
private static function _serializeRecursive($object, \XMLWriter $xmlWriter)
    {
        Validate::notNull($object, 'object');

        $reflectionClass = new \ReflectionClass($object);
        $methodArray = $reflectionClass->getMethods();

        $result = [];
        foreach ($methodArray as $method) {
            if ((strpos($method->name, 'get') === 0)
                && $method->isPublic()
            ) {
                $variableName = substr($method->name, 3);
                $variableValue = $method->invoke($object);
                if (!empty($variableValue) || self::_isRequired($object, $variableName)) {
                    if (is_a($variableValue, '\DateTime')) {
                        $variableValue = $variableValue->format(\DateTime::ATOM);
                    }
                    if (is_a($variableValue, '\DateInterval')) {
                        $variableValue = self::dateIntervalToString($variableValue);
                    }
                    if (gettype($variableValue) == 'array') {
                        $xmlWriter->startElementNS(
                            'data',
                            $variableName,
                            Resources::DS_XML_NAMESPACE
                        );

                        foreach ($variableValue as $item) {
                            $xmlWriter->startElementNS(
                                'data',
                                Resources::ELEMENT,
                                Resources::DS_XML_NAMESPACE
                            );

                            self::_serializeRecursive(
                                $item,
                                $xmlWriter
                            );

                            $xmlWriter->endElement();
                        }

                        $xmlWriter->endElement();
                    } elseif (gettype($variableValue) == 'object') {
                        $xmlWriter->startElementNS(
                            'data',
                            $variableName,
                            Resources::DS_XML_NAMESPACE
                        );

                        self::_serializeRecursive(
                            $variableValue,
                            $xmlWriter
                        );

                        $xmlWriter->endElement();
                    } else {
                        $xmlWriter->writeElementNS(
                            'data',
                            $variableName,
                            Resources::DS_XML_NAMESPACE,
                            (string) $variableValue
                        );
                    }
                }
            }
        }

        return $result;
    }
1335841
public function xmlSerialize(Xml\Writer $writer)
    {
        $parameters = [];

        foreach ($this->parameters as $parameter) {
            if ('VALUE' === $parameter->name) {
                continue;
            }

            $parameters[] = $parameter;
        }

        $writer->startElement(strtolower($this->name));

        if (!empty($parameters)) {
            $writer->startElement('parameters');

            foreach ($parameters as $parameter) {
                $writer->startElement(strtolower($parameter->name));
                $writer->write($parameter);
                $writer->endElement();
            }

            $writer->endElement();
        }

        $this->xmlSerializeValue($writer);
        $writer->endElement();
    }
1287147
public function writeInnerXml(\XMLWriter $xmlWriter)
    {
        Validate::notNull($xmlWriter, 'xmlWriter');

        $this->writeOptionalAttribute($xmlWriter, 'href', $this->href);
        $this->writeOptionalAttribute($xmlWriter, 'rel', $this->rel);
        $this->writeOptionalAttribute($xmlWriter, 'type', $this->type);
        $this->writeOptionalAttribute($xmlWriter, 'hreflang', $this->hreflang);
        $this->writeOptionalAttribute($xmlWriter, 'title', $this->title);
        $this->writeOptionalAttribute($xmlWriter, 'length', $this->length);

        if (!empty($this->undefinedContent)) {
            $xmlWriter->writeRaw($this->undefinedContent);
        }
    }