\PhpOffice\PhpPowerpoint\TestsXmlDocument

DOM wrapper class

Summary

Methods
Properties
Constants
__construct()
getFileDom()
getNodeList()
getElement()
getFile()
getPath()
getElementAttribute()
attributeElementExists()
elementExists()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$path
$dom
$xpath
$file
N/A

Properties

$path

$path : string

Path

Type

string

$dom

$dom : \DOMDocument

DOMDocument object

Type

\DOMDocument

$xpath

$xpath : \DOMXpath

DOMXpath object

Type

\DOMXpath

$file

$file : string

File name

Type

string

Methods

__construct()

__construct(string  $path) 

Create new instance

Parameters

string $path

getFileDom()

getFileDom(string  $file = 'word/document.xml') : \DOMDocument

Get DOM from file

Parameters

string $file

Returns

\DOMDocument

getNodeList()

getNodeList(string  $path, string  $file = 'word/document.xml') : \DOMNodeList

Get node list

Parameters

string $path
string $file

Returns

\DOMNodeList

getElement()

getElement(string  $path, string  $file = 'word/document.xml') : \DOMElement

Get element

Parameters

string $path
string $file

Returns

\DOMElement

getFile()

getFile() : string

Get file name

Returns

string

getPath()

getPath() : string

Get path

Returns

string

getElementAttribute()

getElementAttribute(string  $path, string  $attribute, string  $file = 'word/document.xml') : string

Get element attribute

Parameters

string $path
string $attribute
string $file

Returns

string

attributeElementExists()

attributeElementExists(string  $path, string  $attribute, string  $file = 'word/document.xml') : string

Get element attribute

Parameters

string $path
string $attribute
string $file

Returns

string

elementExists()

elementExists(string  $path, string  $file = 'word/document.xml') : string

Check if element exists

Parameters

string $path
string $file

Returns

string