Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.

XML Processor: Add auto pulling semantics #24

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Draft

Conversation

adamziel
Copy link
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant