XML
Interfaces
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
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
- @deprecated use
- $filesystem : Filesystem = new NativeLocalFilesystem()
Return values
XMLParserExtractorto_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
- @deprecated use
- $row_element_name : string = 'row'
-
- @deprecated use
withRowElementName()method instead
- @deprecated use
- $attribute_prefix : string = '_'
-
- @deprecated use
withAttributePrefix()method instead
- @deprecated use
- $date_time_format : string = 'Y-m-d\TH:i:s.uP'
-
- @deprecated use
withDateTimeFormat()method instead
- @deprecated use
- $xml_writer : XMLWriter = new StringXMLWriter()
- $filesystem : Filesystem = new NativeLocalFilesystem()