略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Working with the OO API

2024-05-05

Working with the OO API

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

示例 #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>
add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/example.xmlwriter-oop.php

冷却塔厂家 广告
中文GPT4.0无需注册 广告
搬瓦工VPS 广告
北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3