Skip to content

XML Processor: Add auto pulling semantics#24

Draft
adamziel wants to merge 1 commit intotrunkfrom
xml-auto-pull
Draft

XML Processor: Add auto pulling semantics#24
adamziel wants to merge 1 commit intotrunkfrom
xml-auto-pull

Conversation

@adamziel
Copy link
Copy Markdown
Contributor

Add support for Byte Streams in XMLProcessor to move through larger documents without explicit is_paused_at_incomplete_input() calls:

$processor = XMLProcessor::create_for_streaming(
	FileReadStream::from_path(__DIR__ . '/fixtures/10MB.xml')
);
$processor->next_tag('content:encoded');

// A new handy utility to collect all cdata and text nodes contents:
$text = $processor->get_all_modifiable_text_until_next_tag();
// The entire text will be stream-loaded from the disk – even if there's 40MB of it

…ments without explicit is_paused_at_incomplete_input() calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant