Returns the xml structure the writer
will use.

@return string
557412
public function getXml(): string
    {
        $suites = $this->interpreter->flattenCases();
        $root = $this->getSuiteRoot($suites);
        foreach ($suites as $suite) {
            $snode = $this->appendSuite($root, $suite);
            foreach ($suite->cases as $case) {
                $cnode = $this->appendCase($snode, $case);
            }
        }

        return $this->document->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;
    }
226922
function xmlString()
    {
        $doc = new DOMDocument( '1.0', 'utf-8' );
        $root = $doc->createElement( "ezmultioption2" );
        $doc->appendChild( $root );


        $this->createDomElementForGroup( $doc, $root );

        $rulesNode = $doc->createElement( "rules" );

        foreach ( $this->Rules as $ruleFor => $rule )
        {
            unset( $ruleNode );
            $ruleNode = $doc->createElement( "rule" );
            $ruleNode->setAttribute( "option_id", $ruleFor );
            foreach ( $rule as $multioptionID => $ruleData )
            {
                unset( $ruleDataNode );
                $ruleDataNode = $doc->createElement( "rule_data" );
                $ruleDataNode->setAttribute( "multioption_id", $multioptionID );
                foreach ( $ruleData as $optionID )
                {
                    unset( $includeNode );
                    $includeNode = $doc->createElement( "option_id", $optionID );
                    $ruleDataNode->appendChild( $includeNode );
                }
                $ruleNode->appendChild( $ruleDataNode );
            }
            $rulesNode->appendChild( $ruleNode );
        }
        $root->appendChild( $rulesNode );

        $xml = $doc->saveXML();
        return $xml;
    }
1039457
public function getStylesXMLFileContent()
    {
        $content = <<<EOD
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
EOD;

        $content .= $this->getFontsSectionContent();
        $content .= $this->getFillsSectionContent();
        $content .= $this->getBordersSectionContent();
        $content .= $this->getCellStyleXfsSectionContent();
        $content .= $this->getCellXfsSectionContent();
        $content .= $this->getCellStylesSectionContent();

        $content .= <<<EOD
</styleSheet>
EOD;

        return $content;
    }
693027
public function toXML()
    {
        $namespace = 'tns';
        $writer = new XMLWriter();
        $writer->openMemory();
        $writer->setIndent(true);
        $writer->setIndentString('    ');
        $writer->startElementNs($namespace, 'BrRac', null);
        $writer->writeElementNs($namespace, 'BrOznRac', null, $this->getInvoiceNumber());
        $writer->writeElementNs($namespace, 'OznPosPr', null, $this->getBusinessLocationCode());
        $writer->writeElementNs($namespace, 'OznNapUr', null, $this->getPaymentDeviceCode());
        $writer->endElement();

        return $writer->outputMemory();
    }
548738
public function xml()
    {
        if (empty($this->_result) || empty($this->_ids)) {
            return $this->xml->getSimpleXmlElement();
        }

        $columnsChild = $this->xml->addChild('columns');
        // Fill the xml with preferences
        foreach ($this->_ids as $id=>$column_name) {
            $columnChild = $columnsChild->addChild('column');
            $columnChild->addAttribute('id', $id);
            $columnChild->addAttribute('name', $column_name);
        }

        $disksChild = $this->xml->addChild('disks');
        // Now fill the xml with S.M.A.R.T datas
        foreach ($this->_result as $diskName=>$diskInfos) {
            $diskChild = $disksChild->addChild('disk');
            $diskChild->addAttribute('name', $diskName);
            foreach ($diskInfos as $lineInfos) {
                $lineChild = $diskChild->addChild('attribute');

                if (($lineInfos['id'] == 9) && isset($lineInfos['attribute_name']) && ($lineInfos['attribute_name'] !== "Power_On_Hours")) { //Power_On_Hours_and_Msec and Power_On_Seconds
                    $lineInfos['attribute_name'] = "Power_On_Hours";
                    $raw_value = preg_split("/h/", $lineInfos['raw_value'], -1, PREG_SPLIT_NO_EMPTY);
                    $lineInfos['raw_value'] = $raw_value[0];
                }

                foreach ($lineInfos as $label=>$value) {
                    $lineChild->addAttribute($label, $value);
                }
            }
        }

        return $this->xml->getSimpleXmlElement();
    }
1268707
protected function buildXmlStructure()
	{
		$buffer = array();

		foreach ($this->from as $table)
		{
			// Replace the magic prefix if found.
			$table = $this->getGenericTableName($table);

			// Get the details columns information.
			$fields = $this->db->getTableColumns($table, false);
			$keys   = $this->db->getTableKeys($table);

			$buffer[] = '  <table_structure name="' . $table . '">';

			foreach ($fields as $field)
			{
				$buffer[] = '   <field Field="' . $field->Field . '" Type="' . $field->Type . '" Null="' . $field->Null . '" Key="' .
					$field->Key . '"' . (isset($field->Default) ? ' Default="' . $field->Default . '"' : '') . ' Extra="' . $field->Extra . '"' .
					' />';
			}

			foreach ($keys as $key)
			{
				$buffer[] = '   <key Table="' . $table . '" Non_unique="' . $key->Non_unique . '" Key_name="' . $key->Key_name . '"' .
					' Seq_in_index="' . $key->Seq_in_index . '" Column_name="' . $key->Column_name . '" Collation="' . $key->Collation . '"' .
					' Null="' . $key->Null . '" Index_type="' . $key->Index_type . '"' .
					' Comment="' . htmlspecialchars($key->Comment, ENT_COMPAT, 'UTF-8') . '"' .
					' />';
			}

			$buffer[] = '  </table_structure>';
		}

		return $buffer;
	}
911672
public function getHtmlBody()
    {
        $xpath = new DOMXPath($this->_doc);
        $bodyNodes = $xpath->query('/html/body')->item(0)->childNodes;

        $outputFragments = array();
        for ($count = 0; $count < $bodyNodes->length; $count++) {
            $outputFragments[] = $this->_doc->saveXML($bodyNodes->item($count));
        }

        return implode($outputFragments);
    }
391455
public function xmlOutput() {
        $o = '';
        $o.= '        <KEY NAME="' . $this->name . '"';
        $o.= ' TYPE="' . $this->getXMLDBKeyName($this->type) . '"';
        $o.= ' FIELDS="' . implode(', ', $this->fields) . '"';
        if ($this->type == XMLDB_KEY_FOREIGN ||
            $this->type == XMLDB_KEY_FOREIGN_UNIQUE) {
            $o.= ' REFTABLE="' . $this->reftable . '"';
            $o.= ' REFFIELDS="' . implode(', ', $this->reffields) . '"';
        }
        if ($this->comment) {
            $o.= ' COMMENT="' . htmlspecialchars($this->comment) . '"';
        }
        $o.= '/>' . "\n";

        return $o;
    }
108391
public function getDOMDocument()
    {
        if ($this->domDocument instanceof DOMDocument === false) {
            $this->domDocument = new DOMDocument('1.0', 'UTF-8');

            libxml_clear_errors();
            $previousSetting = libxml_use_internal_errors(true);

            @$this->domDocument->loadXML($this->response->getBody());

            libxml_clear_errors();
            libxml_use_internal_errors($previousSetting);
        }

        return $this->domDocument;
    }
671195
public function xml()
    {
        if (!empty($this->_result)) {
            $xmluu = $this->xml->addChild("UpdateNotifier");
            $xmluu->addChild("packages", $this->_result[0]);
            $xmluu->addChild("security", $this->_result[1]);
        }

        return $this->xml->getSimpleXmlElement();
    }
944027
public function xml()
    {
        foreach ($this->_result as $disk_items) {
            if (isset($disk_items['Name']) && (trim($disk_items['Name']) !== '')) {
                $xmlstablebit_disk = $this->xml->addChild("Disk");
                foreach ($this->stablebit_items as $item) {
                    if (isset($disk_items[$item]) && (($itemvalue=$disk_items[$item]) !== '') &&
                    (($item !== 'SerialNumber') || (defined('PSI_PLUGIN_STABLEBIT_SHOW_SERIAL') && (PSI_PLUGIN_STABLEBIT_SHOW_SERIAL === true)))) {
                        $xmlstablebit_disk ->addAttribute($item, $itemvalue);
                    }
                }
            }
        }

        return $this->xml->getSimpleXmlElement();
    }
92079
public function getXML(){
		$doc = new \DomDocument('1.0');
		$doc->preserveWhiteSpace = false;
		$doc->formatOutput = true;
		$doc->loadXML($this->dom->asXml());
		return $doc->saveXML();
	}
545899
protected function buildXml()
	{
		$buffer = array();

		$buffer[] = '<?xml version="1.0"?>';
		$buffer[] = '<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">';
		$buffer[] = ' <database name="">';

		$buffer = array_merge($buffer, $this->buildXmlStructure());

		$buffer[] = ' </database>';
		$buffer[] = '</mysqldump>';

		return implode("\n", $buffer);
	}
905845
public function xml()
    {
        foreach ($this->_filecontent as $machine) {
            $xmlmach = $this->xml->addChild("Machine");
            $xmlmach->addAttribute("Name", $machine[0]);
            $xmlmach->addAttribute("State", $machine[1]);
        }

        return $this->xml->getSimpleXmlElement();
    }
1018122
protected function buildXmlStructure()
	{
		$buffer = array();

		foreach ($this->from as $table)
		{
			// Replace the magic prefix if found.
			$table = $this->getGenericTableName($table);

			// Get the details columns information.
			$fields    = $this->db->getTableColumns($table, false);
			$keys      = $this->db->getTableKeys($table);
			$sequences = $this->db->getTableSequences($table);

			$buffer[] = '  <table_structure name="' . $table . '">';

			foreach ($sequences as $sequence)
			{
				if (version_compare($this->db->getVersion(), '9.1.0') < 0)
				{
					$sequence->start_value = null;
				}

				$buffer[] = '   <sequence Name="' . $sequence->sequence . '" Schema="' . $sequence->schema . '"' .
					' Table="' . $sequence->table . '" Column="' . $sequence->column . '" Type="' . $sequence->data_type . '"' .
					' Start_Value="' . $sequence->start_value . '" Min_Value="' . $sequence->minimum_value . '"' .
					' Max_Value="' . $sequence->maximum_value . '" Increment="' . $sequence->increment . '"' .
					' Cycle_option="' . $sequence->cycle_option . '"' .
					' />';
			}

			foreach ($fields as $field)
			{
				$buffer[] = '   <field Field="' . $field->column_name . '" Type="' . $field->type . '" Null="' . $field->null . '"' .
							(isset($field->default) ? ' Default="' . $field->default . '"' : '') . ' Comments="' . $field->comments . '"' .
					' />';
			}

			foreach ($keys as $key)
			{
				$buffer[] = '   <key Index="' . $key->idxName . '" is_primary="' . $key->isPrimary . '" is_unique="' . $key->isUnique . '"' .
					' Query="' . $key->Query . '" />';
			}

			$buffer[] = '  </table_structure>';
		}

		return $buffer;
	}
729556
protected function createJUnitXMLWriter()
    {
        $streamWriter = $this->createStreamWriter($this->junitXMLFile);
        $utf8Converter = extension_loaded('mbstring') ? new UTF8Converter() : new NullUTF8Converter();

        return $this->junitXMLRealtime ? new StreamJUnitXMLWriter($streamWriter, $utf8Converter) : new DOMJUnitXMLWriter($streamWriter, $utf8Converter);
    }