Flow PHP

XMLParserExtractor implements BatchableExtractor, Extractor, FileExtractor, LimitPushDown, MetadataColumnsExtractor, RewindableExtractor uses Batches, PushesLimit, FileReading

FinalYes

Interfaces

BatchableExtractor
Extractor
FileExtractor
LimitPushDown
MetadataColumnsExtractor
RewindableExtractor

Methods

__construct()  : mixed
To iterate only over <element> nodes, use `$loader->withXMLNodePath('root/elements/element')`.
extract()  : Generator<Signal|null, void>
isRepeatable()  : bool
schema()  : Schema
source()  : Path
withBufferSize()  : self
withSchema()  : static
withXMLNodePath()  : self

Methods

__construct()

To iterate only over <element> nodes, use `$loader->withXMLNodePath('root/elements/element')`.

public __construct(Path $path[, Filesystem $filesystem = new NativeLocalFilesystem() ]) : mixed

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
$filesystem : Filesystem = new NativeLocalFilesystem()

extract()

public extract(FlowContext $context) : Generator<Signal|null, void>
Parameters
$context : FlowContext
Return values
Generator<Signal|null, void>

withBufferSize()

public withBufferSize(int<1, max> $bufferSize) : self
Parameters
$bufferSize : int<1, max>

$bufferSize - size of the chunks to read from the xml file. Bigger chunks means faster reading but more memory usage.

Return values
self

withSchema()

public withSchema(Schema $schema) : static
Parameters
$schema : Schema
Return values
static

withXMLNodePath()

public withXMLNodePath(string $xmlNodePath) : self
Parameters
$xmlNodePath : string
Return values
self
On this page

Search results