RDF::T...andler(3pm)

πŸ“¦
version 1.019 Β· 7 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– RDF::Trine::Iterator::SAXHandler β€” bestie edition πŸ’–

okay so. this is a page from the User Contributed Perl Documentation (the perl man pages, iykyk), and the module we're talking about is RDF::Trine::Iterator::SAXHandler β€” a SAX Handler for parsing SPARQL XML Results format. it's giving parser energy. it's giving XML. it's giving results. πŸ¦‹


✨ NAME ✨

RDF::Trine::Iterator::SAXHandler β€” literally just: a SAX Handler for parsing SPARQL XML Results format. that's the whole vibe. πŸŽ€


🌸 VERSION 🌸

this doc describes RDF::Trine::Iterator::SAXHandler version 1.019. periodt. πŸ’…


⚠️ STATUS ⚠️

okay bestie, sit down for this one. this module's API and functionality should be considered unstable. πŸ’€

fr fr β€” in the future this module may change in backwards-incompatible ways, or be removed entirely. like, gone gone. so if you need the functionality this module provides, please get in touch at <http://www.perlrdf.org/>. they wanna hear from you, no cap. 🫢


🌈 SYNOPSIS 🌈

the whole thing, verbatim, because code is sacred:

use RDF::Trine::Iterator::SAXHandler;
my $handler = RDF::Trine::Iterator::SAXHandler->new();
my $p = XML::SAX::ParserFactory->parser(Handler => $handler);
$p->parse_file( $string );
my $iter = $handler->iterator;

slay. that's it. that's the whole workflow. ✨


πŸ‘‘ METHODS πŸ‘‘

so beyond the methods documented below, this class inherits methods from the XML::SAX::Base class. freebies. we love a generous parent class. 🎁

  • new ( [ \&handler ] ) β€” returns a new XML::SAX handler object. and here's the spicy part: if &handler is supplied, it gets called with a variable bindings object as each one is parsed β€” which means it bypasses the normal process of collecting the results for retrieval via an iterator object. so you're going rogue, you're doing it live, main character energy. 🎀
  • iterator β€” returns the RDF::Trine::Iterator object, but only after parsing is complete. patience, bestie. ⏳
  • iterator_class β€” returns the iterator class appropriate for the parsed results. it's either ::Iterator::Boolean or ::Iterator::Bindings. two options, no in-between. πŸ’…
  • iterator_args β€” returns the arguments suitable for passing to the iterator constructor after the iterator data. the little extras. the garnish. πŸ“
  • pull_result β€” returns the next result from the iterator, if available (like, if it has been parsed yet). otherwise, returns the empty list. nothing. nada. an empty little void. πŸ™ˆ

πŸ› BUGS πŸ›

found a bug? got a feature request? please report it through the GitHub web interface at <https://github.com/kasei/perlrdf/issues>. do it. they wanna know. 🫢


🧚 AUTHOR 🧚

Gregory Todd Williams β€” "<gwilliams@cpan.org>". an icon, honestly. πŸ‘‘


Copyright (c) 2006-2012 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. πŸ’œ


okay that's the whole page, we ate and left no crumbs 🍽️✨ β€” this was RDF::T...andler(3pm) from perl v5.38.2, dated 2024-01-13, and that's the tea. byeee πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from