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>isRepeatable()
public
isRepeatable() : bool
Return values
boolschema()
public
schema() : Schema
Return values
Schemasource()
public
source() : Path
Return values
PathwithBufferSize()
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
selfwithSchema()
public
withSchema(Schema $schema) : static
Parameters
- $schema : Schema
Return values
staticwithXMLNodePath()
public
withXMLNodePath(string $xmlNodePath) : self
Parameters
- $xmlNodePath : string