编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
  • « Working with XML namespaces
  • XMLWriter 函数 »
  • PHP Manual
  • 范例
  • Working with the OO API

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>

相关文章
mysql php apiphp 其它服务 hyperwave apiphp mysql 原始的 mysql apiphp 范例 working with the oo apiphp svn 函数 delete items from a working copy or repositoryphp hyperwave api 预定义常量php hyperwave api 函数 returns mimetypephp hyperwave api 函数 read contentphp hyperwave api 函数 returns information about server configurationphp hyperwave api 函数 inserts a new objectphp hyperwave api 函数 inserts a new object of type anchorphp hyperwave api 函数 inserts a new object of type collectionphp hyperwave api 函数 retrieve attribute informationphp hyperwave api 函数 returns the object an anchor belongs tophp hyperwave api 函数 returns parents of an objectphp hyperwave api 函数 returns description of reasonphp hyperwave api 简介php quick start guide api support for transactionsphp mysqlnd mysql native driver plugin apiphp 范例 working with data structures
关注编程学问公众号
编程学问网 湘ICP备20001732号