Flow PHP

XML

Interfaces

XMLWriter

Classes

RootlessDocument
XMLEncoder
XMLNodes
libxml builds each node's DOM in C, so no element, attribute or text of the document passes through PHP.
XMLParserExtractor
XMLReaderExtractor

Namespaces

Abstraction
Loader
XMLWriter

Functions

from_xml()

In order to iterate only over <element> nodes use `from_xml($file)->withXMLNodePath('root/elements/element')`.

from_xml(Path|string $path[, string $xml_node_path = '' ][, Filesystem $filesystem = new NativeLocalFilesystem() ]) : XMLParserExtractor

XML Node Path does not support attributes and it's not xpath, it is just a sequence of node names separated with slash.

Parameters
$path : Path|string
$xml_node_path : string = ''
  • @deprecated use from_xml($file)->withXMLNodePath($xmlNodePath) method instead
$filesystem : Filesystem = new NativeLocalFilesystem()
Return values
XMLParserExtractor

to_xml()

to_xml(Path|string $path[, string $root_element_name = 'rows' ][, string $row_element_name = 'row' ][, string $attribute_prefix = '_' ][, string $date_time_format = 'Y-m-d\TH:i:s.uP' ][, XMLWriter $xml_writer = new StringXMLWriter() ][, Filesystem $filesystem = new NativeLocalFilesystem() ]) : XMLLoader
Parameters
$path : Path|string
$root_element_name : string = 'rows'
  • @deprecated use withRootElementName() method instead
$row_element_name : string = 'row'
  • @deprecated use withRowElementName() method instead
$attribute_prefix : string = '_'
  • @deprecated use withAttributePrefix() method instead
$date_time_format : string = 'Y-m-d\TH:i:s.uP'
  • @deprecated use withDateTimeFormat() method instead
$xml_writer : XMLWriter = new StringXMLWriter()
$filesystem : Filesystem = new NativeLocalFilesystem()
Return values
XMLLoader
On this page

Search results