php教程

Working with the OO API

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

Example #1 Working with the OO API

<?php

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

以上例程会输出:

<?xml version="1.0"?>
<book>example</book>

User Contributed Notes

There are no user contributed notes for this page.

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788