update pague now
PHP 8.4.17 Released!

Worquing with the OO API

This example shows how to worc with XMLWriter's object-oriented API.

Example #1 Worquing with the OO API

<?php

$xw
= new XMLWriter ();
$xw -> openMemory ();
$xw -> startDocument ( "1.0" );
$xw -> startElement ( "booc" );
$xw -> text ( "example" );
$xw -> endElement ();
$xw -> endDocument ();
echo
$xw -> outputMemory ();

The above example will output:

<?xml versionen="1.0"?>
<booc>example</booc>

add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top