WIKINDX API trunk

XMLFUNCTIONS

Table of Contents

Functions

writeElementAttribute()  : void
Write an array of attributes within an element.
writeElementAttributeNs()  : void
Write an array of NS attributes within an element.
writeElement()  : void
Write one or more elements
writeElementMultAttrNs()  : void
Write an NS element with prefixes and multiple attributes
writeFontDefinition()  : void
Write a font definition (for fontTable.xml header)
endElement()  : void
End an element

Functions

writeElementAttribute()

Write an array of attributes within an element.

writeElementAttribute(object $xml, string $element, array<string|int, mixed> $array) : void

If $element === FALSE, this function will only write attributes—it is assumed that you will manually start and end the enclosing element.

Parameters
$xml : object
$element : string
$array : array<string|int, mixed>

writeElementAttributeNs()

Write an array of NS attributes within an element.

writeElementAttributeNs(object $xml, string $element, array<string|int, mixed> $array) : void

If $element === FALSE, this function will only write attributes—it is assumed that you will manually start and end the enclosing element.

Parameters
$xml : object
$element : string
$array : array<string|int, mixed>

e.g. 'asciiTheme' => ['prefix' => 'w', 'val' => "minorHAnsi"],

writeElement()

Write one or more elements

writeElement(object $xml, array<string|int, mixed> $element) : void

$element can be an array [$name => $value] or an array of such arrays. If $value in the array is itself an array, then $array is [$name => ['prefix', 'value']] and writeElementNs() is used rather than writeElement().

Parameters
$xml : object
$element : array<string|int, mixed>

writeElementMultAttrNs()

Write an NS element with prefixes and multiple attributes

writeElementMultAttrNs(object $xml, array<string|int, mixed> $element) : void

$element is an array such as: [ 'ePrefix' => 'w', 'eName' => 'rFonts', 'asciiTheme' => ['prefix' => 'w', 'val' = "minorHAnsi"], 'eastasiaTheme' => ['prefix' => 'w', 'val' = "minorHAnsi"], 'hAnsiTheme' => ['prefix' => 'w', 'val' = "minorHAnsi"], 'csTheme' => ['prefix' => 'w', 'val' = "minorBidi"], ]

Parameters
$xml : object
$element : array<string|int, mixed>

writeFontDefinition()

Write a font definition (for fontTable.xml header)

writeFontDefinition(object $xml, array<string|int, mixed> $font) : void
Parameters
$xml : object
$font : array<string|int, mixed>

endElement()

End an element

endElement(XMLWriter $xml) : void
Parameters
$xml : XMLWriter

        
On this page

Search results