XML operations for PHP extensions (5) -- XMLWriter

Source: Internet
Author: User
Tags comment tag
I. Overview and installation of ThisistheXMLWriterextension. ItwrapsthelibxmlxmlWriterAPI. Thisextensionrepresentsawriterthatprovidesanon-cached, forward-onlym...



I. Overview and installation

This is the XMLWriter extension. It wraps the libxml xmlWriter API.

This extension represents a writer that provides a non-cached, forward-only means of generating streams or files containing XML data.

This extension can be used in an object oriented style or a procedural one. Every method implements ented describes the alternative procedural call.

This extension requires libxml PHP extension. This indicates that you need to use-- Enable-libxml, Though this is done implicitly because libxml is enabled by default.

The XMLWriter extension was initially a PECL extension for PHP 5. It was later added to the PHP source (bundled) as of PHP 5.1.2. This extension is enabled by default.

This extension is enabled by default and can be disabled by the following options during compilation:-- Disable-xmlwriter

II. XMLWriter class and its member functions
  • XMLWriter: endAttribute-End attribute

  • XMLWriter: endCData-End current CDATA

  • XMLWriter: endComment-Create end comment

  • XMLWriter: endDocument-End current document

  • XMLWriter: endDTDAttlist-End current DTD AttList

  • XMLWriter: endDTDElement-End current DTD element

  • XMLWriter: endDTDEntity-End current DTD Entity

  • XMLWriter: endDTD-End current DTD

  • XMLWriter: endElement-End current element

  • XMLWriter: endPI-End current PI

  • XMLWriter: flush-Flush current buffer

  • XMLWriter: fullEndElement-End current element

  • XMLWriter: openMemory-Create new xmlwriter using memory for string output

  • XMLWriter: openURI-Create new xmlwriter using source uri for output

  • XMLWriter: outputMemory-Returns current buffer

  • XMLWriter: setIndentString-Set string used for indenting

  • XMLWriter: setIndent-Toggle indentation on/off

  • XMLWriter: startAttributeNS-Create start namespaced attribute

  • XMLWriter: startAttribute-Create start attribute

  • XMLWriter: startCData-Create start CDATA tag

  • XMLWriter: startComment-Create start comment

  • XMLWriter: startDocument-Create document tag

  • XMLWriter: startDTDAttlist-Create start DTD AttList

  • XMLWriter: startDTDElement-Create start DTD element

  • XMLWriter: startDTDEntity-Create start DTD Entity

  • XMLWriter: startDTD-Create start DTD tag

  • XMLWriter: startElementNS-Create start namespaced element tag

  • XMLWriter: startElement-Create start element tag

  • XMLWriter: startPI-Create start PI tag

  • XMLWriter: text-Write text

  • XMLWriter: writeAttributeNS-Write full namespaced attribute

  • XMLWriter: writeAttribute-Write full attribute

  • XMLWriter: writeCData-Write full CDATA tag

  • XMLWriter: writeComment-Write full comment tag

  • XMLWriter: writeDTDAttlist-Write full DTD AttList tag

  • XMLWriter: writeDTDElement-Write full DTD element tag

  • XMLWriter: writeDTDEntity-Write full DTD Entity tag

  • XMLWriter: writeDTD-Write full DTD tag

  • XMLWriter: writeElementNS-Write full namespaced element tag

  • XMLWriter: writeElement-Write full element tag

  • XMLWriter: writePI-Writes a PI

  • XMLWriter: writeRaw-Write a raw XML text

The above is the XML operation for PHP extension (5) -- XMLWriter content. For more information, see PHP Chinese website (www.php1.cn )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.