Class XmlWriter

Summary

Fully Qualified Name: Zend\XmlRpc\Generator\XmlWriter
Extends: AbstractGenerator

Description

XML generator adapter based on XMLWriter

Methods

Name Description Defined By
__construct() Construct new instance of the generator AbstractGenerator
__toString() Returns XML without document declaration AbstractGenerator
closeElement() End of an XML element AbstractGenerator
flush() Returns the XML as a string and flushes all internal buffers AbstractGenerator
getEncoding() Return encoding AbstractGenerator
openElement() Start XML element AbstractGenerator
saveXml() Emit XML document XmlWriter
setEncoding() Set XML encoding AbstractGenerator
stripDeclaration() Removes XML declaration from a string AbstractGenerator

Method Details

__construct()

Construct new instance of the generator

Parameter Name Type Description
$encoding string XML

Returns:

__toString()

Returns XML without document declaration

Returns: string

closeElement()

End of an XML element

Method marks the end of an XML element

Parameter Name Type Description
$name string XML

Returns: \AbstractGenerator Fluent interface

flush()

Returns the XML as a string and flushes all internal buffers

Returns: string

getEncoding()

Return encoding

Returns: string

openElement()

Start XML element

Method opens a new XML element with an element name and an optional value

Parameter Name Type Description
$name string XML
$value string Optional

Returns: \AbstractGenerator Fluent interface

saveXml()

Emit XML document

Returns: string

setEncoding()

Set XML encoding

Parameter Name Type Description
$encoding string

Returns: \AbstractGenerator

stripDeclaration()

Removes XML declaration from a string

Parameter Name Type Description
$xml string

Returns: string

Top